Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Importing ActiveX in VC++ problem with calling conventions

1 view
Skip to first unread message

wim van houts

unread,
Jul 3, 2003, 8:49:53 AM7/3/03
to
Hi,

I'v imported a 3rd Party OCX in my VS6 C++ project, and used the MIDL
compiler to generate a tlb file. This works fine, and I can create the
object. But when I try to call a function from the ActiveX, it goes wrong. I
get debugging errors that say that the value of ESP is not properly stored,
and it is probably an error with the calling convention.

What I am developping is a DLL, and the calling convention of the project is
__cdecl. I cannot change this, because I'm using LoadLibrary and
GetProcAddress in another service to load this DLL, and this fails when
using the __stdcall calling convention (bcause of the name mangling). I
cannot compile the service with __stdcall, because it's build out of our
custom libs, it is not feasible to rebuild everything.

When I look in the created tlh file, I can see the raw_... functions are
indeed declared as __stdcall, and this is probably causing the errors...

Is there any way to solve this problem?

Thx already
wim

PS: I'm not using MFC, nor precompiled headers...


0 new messages