Problem w/ parameter passing?
Hi,
When I was just compiling a .dll with Visual C++ 6.0, I think I''ve come across an undocumented problem. Here it goes:
I have a multithreaded win32 app which loads a runtime-linked .dll via LoadLibrary() & GetProcAddress().
Now, here is the problem:
One function uses variable argument lists (like printf) let''s just call the function I use "myprintf" and is defined in a class from the main win32 app (passed via pointer to the .dll).
When I call myprintf() from the .dll''s code, it passes the first parameter fine, but all the rest are garbage. (note, this function works perfectly from the main app, so the function is fine...)
If I define a global function called "customprintf" and place it in the globals of both projects; then it works because I have circumvented the while variable argument list passing.
Is this a glitch? or was I just trying to do something the rules of linking .dlls won''t allow?
laxdigital.com
[email=ziggy@laxdigital.com]ziggy@laxdigital.com[/email]
[email=ziggy@laxdigital.com]ziggy@laxdigital.com[/email]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement