David,
Wow! What a great find - thank you - thank you - thank you!
>You will have to redeclare this for each particular set of arguments.
I assume this means that where you have "long argument", I would put a data type specific arg for each value being passed to sprintf?
In other words, if I had a number and a string I would replace "long argument" with something like "long arg1, string arg2" ?
BTW: I replaced ntdll.dll with msvcr71.dll (distributed as part of the runtime setup files) and your idea worked fine. I'm not sure if there are any downsides to using msvcr71.dll? I suggested it in case someone reading this thread needs to use your example on a 9X/ME workstation that will not have ntdll.dll available.
Thanks again Dave!
Malcolm