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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

C++ classes in VB

  • 30-08-2000 3: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, Registered Users 2 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