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

C / C++ / MFC

 
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 
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 
wsprintf vs. printf vs. CString::Format doesn't make too big of a difference in regard to this problem. Just to be clear, I could rewrite any of the above functions. The challenge lies in forwarding these function calls to their originals in a completely generic manner (no matter how many parameters are passed in).

It's not a problem if I know the number of arguments they're going to pass every time. It's pretty trivial then to pull these arguments out (using the format specifiers in this case to pull them out based upon type) and make a call to wsprintf. It's also not a problem if I don't know how many arguments they're passing, but I don't need to forward the call and therefore I don't have to dynamically create a variable length argument list.

The problem is they're passing me an unspecified number of arguments, and I have to forward that call regardless of the number. I'm trying to wrap a function (it's not actually wsprintf, it's just an example) with variable arguments, and I have no idea what the typical calling usage is.

Think of the problem this way: Your mission is to write a replacement function for wsprintf, printf, or CString::Format (I don't really care which one we talk about). This function should write some debug info and forward the call to the original function no matter how the user calls the original function (in other words, no matter how many parameters they actually end up passing).
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 
GeneralRe: C++ Question. Pin
WREY21-Oct-03 23:35
WREY21-Oct-03 23:35 
GeneralSpecified the path with Cfiledialog Pin
sdfdsfa21-Oct-03 8:37
sdfdsfa21-Oct-03 8:37 

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.