Thread: ESP error

  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Rep Power

    ESP error

    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.

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Back in the real world.
    Rep Power
    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Seattle WA
    Rep Power
    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).

IMN logo majestic logo threadwatch logo seochat tools logo