Click here to Skip to main content
16,006,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: HTTP GET example (MFC) Pin
Alexandru Savescu8-Apr-02 22:19
Alexandru Savescu8-Apr-02 22:19 
GeneralRe: HTTP GET example (MFC) Pin
Ravi Bhavnani9-Apr-02 3:09
professionalRavi Bhavnani9-Apr-02 3:09 
QuestionCComboBox with tooltips over dropdown items? Pin
Julia Larson8-Apr-02 12:40
Julia Larson8-Apr-02 12:40 
GeneralCreating Child Frame Pin
act_x8-Apr-02 12:41
act_x8-Apr-02 12:41 
GeneralEnabling active x component :(( :(( Pin
act_x8-Apr-02 12:01
act_x8-Apr-02 12:01 
GeneralRe: Enabling active x component :(( :(( Pin
Joaquín M López Muñoz8-Apr-02 12:10
Joaquín M López Muñoz8-Apr-02 12:10 
Generalforward variable argument lists Pin
8-Apr-02 11:47
suss8-Apr-02 11:47 
GeneralRe: forward variable argument lists Pin
Joaquín M López Muñoz8-Apr-02 11:57
Joaquín M López Muñoz8-Apr-02 11:57 
It can be done in a wildly non-portable fashion just like this (some details may need more careful handling for this to actually work): the variable argument list is stored in the stack and its beginning can be accessed with the macro va_start. So one can just copy a large enough portion of the stack and transfer it to f2. The scheme is as follows:
struct stack_chunk
{
  char memory[1024]; // 1K of stack memory will be enough (hopefully);
};
 
void f1(const char *string,...)
{
  stack_chunk chunk;
  va_list v;
  va_start(v,string); // get hold of the var arg list beginning
  memcpy(&chunk,v,sizeof(chunk)); // copy it
  va_end(v); // done with v;
  ...
  f2(string2,chunk); // copy the whole chunk back to the stack.
}
Please tell us it this worked.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: forward variable argument lists Pin
9-Apr-02 6:30
suss9-Apr-02 6:30 
GeneralRe: forward variable argument lists Pin
Alexandru Savescu8-Apr-02 22:31
Alexandru Savescu8-Apr-02 22:31 
Generalconstructor problem (newbie) Pin
marcela8-Apr-02 11:39
marcela8-Apr-02 11:39 
GeneralRe: constructor problem (newbie) Pin
Joaquín M López Muñoz8-Apr-02 11:39
Joaquín M López Muñoz8-Apr-02 11:39 
GeneralRe: constructor problem (newbie) Pin
Christian Graus8-Apr-02 11:41
protectorChristian Graus8-Apr-02 11:41 
GeneralRe: constructor problem (newbie) Pin
Joaquín M López Muñoz8-Apr-02 11:46
Joaquín M López Muñoz8-Apr-02 11:46 
GeneralRe: constructor problem (newbie) Pin
marcela8-Apr-02 11:49
marcela8-Apr-02 11:49 
GeneralTool tip text Pin
8-Apr-02 11:11
suss8-Apr-02 11:11 
GeneralRe: Tool tip text Pin
Joaquín M López Muñoz8-Apr-02 11:20
Joaquín M López Muñoz8-Apr-02 11:20 
GeneralRe: Tool tip text Pin
Alexandru Savescu8-Apr-02 22:22
Alexandru Savescu8-Apr-02 22:22 
Generaltemplate members Pin
Jamie Hale8-Apr-02 10:25
Jamie Hale8-Apr-02 10:25 
GeneralRe: template members Pin
Joaquín M López Muñoz8-Apr-02 10:25
Joaquín M López Muñoz8-Apr-02 10:25 
GeneralRe: template members Pin
Jamie Hale9-Apr-02 4:53
Jamie Hale9-Apr-02 4:53 
GeneralRe: template members Pin
Joaquín M López Muñoz9-Apr-02 5:05
Joaquín M López Muñoz9-Apr-02 5:05 
GeneralRe: template members Pin
Jamie Hale9-Apr-02 5:17
Jamie Hale9-Apr-02 5:17 
GeneralRe: template members Pin
Joaquín M López Muñoz9-Apr-02 5:41
Joaquín M López Muñoz9-Apr-02 5:41 
GeneralRe: template members Pin
Jamie Hale9-Apr-02 5:45
Jamie Hale9-Apr-02 5:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.