Results 1 to 2 of 2

Thread: Connecting a vb client to c++ header and Api?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    UK
    Posts
    1

    Unhappy

    Howd'y,
    I have an API written in C++ and would like to access this using VB. Is this possible? If so how?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    well, if you've built (for example) MyDLL.dll, then the functions available will be in the MyDLL.def file. Then, insert a Declare statement into a module in your VB project.

    eg:
    Code:
    long TheFunction(int firstnumber, char* astring, float another) {
        ...
    }
    is written as:
    Code:
    Declare Function TheFunction Lib "MyDLL" (firstnumber as Integer, astring as String, another as Single)
    Then just use it in the normal way.


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