Calling Std C DLL from VB ActiveX DLL 
Author Message
 Calling Std C DLL from VB ActiveX DLL

We are calling a standard C DLL (using the EXTERN "C" __declspec(dllexport)
interface definition) from a VB ActiveX DLL passing  a reference to a VB
String (sort of an IDL "out" type parameter) that is to be updated  in the C
DLL.
The problem is that it seems to be crashing when the thread of control
returns to the the VB DLL.
Calling the same C DLL from another standard C DLL does not have the
problem. Is there anything specific that we should be aware of when calling
standard DLL's from VB ActiveX DLL's?

TIA
Clyde.



Sat, 14 Sep 2002 03:00:00 GMT  
 Calling Std C DLL from VB ActiveX DLL

Quote:
>Is there anything specific that we should be aware of when calling
>standard DLL's from VB ActiveX DLL's?

Clyde,

Use the _stdcall calling convention on the exported function, it's the
only one VB supports. And also make sure you pre-allocate the string
parameter large enough to contain everything the function will put in
it.

It's hard to say more than that without seeing the function prototype
and the calling code.

Mattias

__________________________________________________

     VB+ http://hem.spray.se/mattias.sjogren/
 Please send questions/replies to the newsgroups



Sat, 14 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling DLLS in VB Std. Ed.

2. VB 5.0 calling C++ 5.0 DLL that calls winsock.dll

3. ActiveX vs std Dll

4. ActiveX DLL calling DLL procedures from ASP app...

5. call winsock DLL from an ActiveX DLL

6. Calling VB ActiveX DLL from ASP...

7. VB-ActiveX-DLL access violation error when call from C++

8. call VB ActiveX DLL in VC++

9. How to call one VB class module method from another class in an ActiveX dll

10. call VB ActiveX DLL in VC++

11. Calling VB ActiveX dll from VC++ junks up optional variant parameters values

12. Calling VB ActiveX DLL from Visual C++ problem

 

 
Powered by phpBB® Forum Software