PDA

Click to See Complete Forum and Search --> : Connecting a vb client to c++ header and Api?


Catt
Jun 14th, 2000, 09:58 PM
Howd'y,
I have an API written in C++ and would like to access this using VB. Is this possible? If so how?

parksie
Jun 15th, 2000, 12:36 AM
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:

long TheFunction(int firstnumber, char* astring, float another) {
...
}

is written as:

Declare Function TheFunction Lib "MyDLL" (firstnumber as Integer, astring as String, another as Single)


Then just use it in the normal way.