Click here to Skip to main content
15,917,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The Invasion Game Pin
David Crow21-Oct-03 11:03
David Crow21-Oct-03 11:03 
GeneralRe: The Invasion Game Pin
Rafael Fernández López21-Oct-03 11:49
Rafael Fernández López21-Oct-03 11:49 
GeneralDebugging an ATL Dll using a manged application Pin
Rainer Mangold21-Oct-03 10:31
Rainer Mangold21-Oct-03 10:31 
GeneralRe: Debugging an ATL Dll using a manged application Pin
igor196021-Oct-03 11:21
igor196021-Oct-03 11:21 
GeneralRe: Debugging an ATL Dll using a manged application Pin
Rainer Mangold21-Oct-03 11:39
Rainer Mangold21-Oct-03 11:39 
GeneralDynamically creating variable length argument list Pin
Kentamanos21-Oct-03 9:47
Kentamanos21-Oct-03 9:47 
GeneralRe: Dynamically creating variable length argument list Pin
David Crow21-Oct-03 10:01
David Crow21-Oct-03 10:01 
GeneralRe: Dynamically creating variable length argument list Pin
21-Oct-03 10:12
suss21-Oct-03 10:12 
The problem is the var1, var2, etc. part Smile | :) .

If they pass in just 2 parameters, I need to call wsprintf one way. If they pass 3, another way, and so on.

I could potentially create a huge if statement with a call to the original function for each number of parameters. In that case, I assume you'd treat all the arguments as void *, but you'd have to put a limit on how many actual parameters you wanted to support. You could cover up to 10 parameters for instance, but the instant they pass 11, your function won't call the original correctly.

I'd like to find the correct way to do this by dynamically creating the argument list with the arguments they passed in. I've seen built in functions that look like they would work on gcc, but I don't know what the VC++ equivalent would really be.
GeneralRe: Dynamically creating variable length argument list Pin
David Crow21-Oct-03 11:02
David Crow21-Oct-03 11:02 
GeneralRe: Dynamically creating variable length argument list Pin
Kentamanos21-Oct-03 11:27
Kentamanos21-Oct-03 11:27 
GeneralRe: Dynamically creating variable length argument list Pin
David Crow21-Oct-03 17:06
David Crow21-Oct-03 17:06 
GeneralRe: Dynamically creating variable length argument list Pin
Kentamanos22-Oct-03 6:38
Kentamanos22-Oct-03 6:38 
GeneralRe: Dynamically creating variable length argument list Pin
David Crow22-Oct-03 7:34
David Crow22-Oct-03 7:34 
GeneralRe: Dynamically creating variable length argument list Pin
WREY21-Oct-03 11:26
WREY21-Oct-03 11:26 
GeneralRe: Dynamically creating variable length argument list Pin
Kentamanos21-Oct-03 11:47
Kentamanos21-Oct-03 11:47 
GeneralRe: Dynamically creating variable length argument list Pin
WREY21-Oct-03 12:58
WREY21-Oct-03 12:58 
GeneralRe: Dynamically creating variable length argument list Pin
Kentamanos21-Oct-03 13:19
Kentamanos21-Oct-03 13:19 
GeneralRe: Dynamically creating variable length argument list Pin
WREY21-Oct-03 14:23
WREY21-Oct-03 14:23 
GeneralRe: Dynamically creating variable length argument list Pin
Kentamanos22-Oct-03 6:41
Kentamanos22-Oct-03 6:41 
GeneralRe: Dynamically creating variable length argument list Pin
John R. Shaw21-Oct-03 15:21
John R. Shaw21-Oct-03 15:21 
GeneralC++ Question. Pin
WREY21-Oct-03 9:41
WREY21-Oct-03 9:41 
GeneralRe: C++ Question. Pin
David Crow21-Oct-03 9:46
David Crow21-Oct-03 9:46 
GeneralRe: C++ Question. Pin
WREY21-Oct-03 10:30
WREY21-Oct-03 10:30 
GeneralRe: C++ Question. Pin
Andrew Walker21-Oct-03 14:05
Andrew Walker21-Oct-03 14:05 
GeneralRe: C++ Question. Pin
John R. Shaw21-Oct-03 15:55
John R. Shaw21-Oct-03 15:55 

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.