I must manage dynamic memory structures like stacks and queues and VB doesn't handle with them...<br>
So I thaught generating a DLL with MS-Visual C++ but I don't know how to tell VB to use it.<br>
<br>
Thanx
VB can deal with C DLLs in two main ways:<br>
1) The DLL does Active-X<br>
2) The DLL exports functions (your typical WINAPI function declaration)<br>
Note that VB can't handle the mangling of C++.<br>
<br>
A tougher question might be the datatypes that VB supports. With Active-X, it's not really a problem, since VB knows about all the usual COM datatypes. With the exported function method, you shouldn't have any pointers in your list. It's really difficult, even for experienced VB programmers, to dereference pointers. <br>
<br>
If you are using a pointer for caller-storage, lie to the VB programmers and tell them it's a handle (well, it kindof is, isn't it?), then they would assign it to a LONG variable, and never touch it, just pass it along to other functions you exported.<br>
<br>
Strings can be tough, since when VB calls a C DLL it converts it to ANSI. If you're a Unicode kindof guy, then you'll have to convert it befor using it.<br>
<br>
Ints and floats should be OK, as long as you're on a Intel CPU, but I've never had to pass one to a DLL, myself.<br>
<br>
Chip H.<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.