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.
 
Back
Top