January 30th, 2003, 06:54 AM
I am trying to use a VB COM dll from VC. I am using smart pointers to achieve this.
When I import the DLL file, everything works fine, but when I try to import the tlb file, it gives ESP error.
I generated the tlb fileby compiling the IDL file. I even prefixed every function definition with __stdcall, but to no avail.
Please help me out.
January 30th, 2003, 04:07 PM
i never encountered a problem like that (nor ever used VB), but iirc MS likes to implement COM functions as __fastcall and __stdcall is used for DLLs, maybe this helps?
ESP errors can be caused by wrong interface implementation like that.
Itīs just a guess and it could also be completely wrong. I didnīt do much work with MS-VC yet.
January 30th, 2003, 04:42 PM
I've gotten ESP errors when trying to call interface methods incorrectly, supplying bad arguments. I've never worked with VB and COM before though, so who knows. Are you sure none of your methods take or return invalid data types? Does VB support these types (I'm not familiar with the native VARIANT types VB supports).