William DePalo [MVP VC++] wrote:
"Bit Byte" <fl**@flop.comwrote in message
news:Gr******************************@bt.com...
>>Is it possible to pass variable length parameters to a C function exported
in a DLL (i.e. using varargs.h without resorting to say passing a
delimited string to be parsed in the function)?
i.e. I want something like this:
#include <varargs.h>
CCONV foo( char* fmt, va_list args ) ;
where CCONV is the calling convention (import/export)
Yes. In fact wsprintf(), which takes a variable number of arguments, is
exported by USER32.DLL. What problem are you having?
Regards,
Will
Hi Will,
Thanks for replying, actually, my prototype was wrong. I wanted
something more like this:
CCONV foo(char* fmt, ...) ;
To be exported by my DLL - is this possible ?
(from what you say though - it should be possible - since wsprintf is
exported by user32.dll. I have seen a lot of questions posted about this
and the answer seems to be a resounding no - or having to resort to
"tricks".
Ah, but I did leave out one piece of (vital?) information though - I
want to be able to call this Dll function from VB - still possible ?