Results 1 to 3 of 3

Thread: Calling Exported VC++ Class in WIN32 DLL

  1. #1

    Thread Starter
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Calling Exported VC++ Class in WIN32 DLL

    How can i call the function belong to the exported class from Visual Basic?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Using a C++ class in VB is nearly impossible (it is possible, but very hard and likely to attract bugs), except when you use .NET (and that's not a C++ class anymore).

    You'd have to look up the mangled name, specify it as the alias of the function name you really want to use, then create a Type in VB that exactly matches the data structure of the class, initialize it correctly and pass it ByRef as the first parameter to the function (that's the this pointer).
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    Thx CornedBee advice

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width