Error 49: Bad .dll Calling Convention

  • Thread starter Thread starter Jarrett Sadowsky
  • Start date Start date
J

Jarrett Sadowsky

I have been successfully using dll's in VBA 6.0. However,
the same dll's give the subject error when run in VBA
6.3. Any suggestions?
 
I have been successfully using dll's in VBA 6.0. However,
the same dll's give the subject error when run in VBA
6.3. Any suggestions?

VBA can only successfully call functions that are declared as "__stdcall".
If the function insside your DLL was declared as "__cdecl" (the default)
you will always get this error message.

The workaround is to create a __stdcall function that calls the __cdecl
function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top