Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C++ classes in VB

Options
  • 30-08-2000 4:44pm
    #1
    Subscribers Posts: 1,911 ✭✭✭


    Background:
    I wrote an API for doing digital signing out of one of my company's products. Company B wants to use this API. API is in C++, Company B's product is written in VB.

    Question:
    Can they use the C++ functions and classes from the API directly in their VB or are we going to have write some sort of wrapper?

    Draco


Comments

  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Nope they should be able to use it directly from VB.



  • Closed Accounts Posts: 218 ✭✭Void


    Calling functions isn't a problem, it goes something like this:
    Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long

    Where "Lib" is the name of your dll or whatever. As for classes, that's slightly trickier. You could make your API into an ActiveX control, then it could be directly inserted into a VB project.


  • Subscribers Posts: 1,911 ✭✭✭Draco


    Originally posted by Void:
    As for classes, that's slightly trickier. You could make your API into an ActiveX control, then it could be directly inserted into a VB project.
    This is exactly what I was looking for.

    Thanks.

    Draco



    http://www.theyshoulddie.com
    Making the world a better place one person at a time.


Advertisement