Using VB-dll with C
I have a dll written in VB and would like to load it and use it from C code. How do I do that? Are there any type differences that I need to handel, that is the Strings are different etc.
I have some example code in VB that starts like this:
Private Declare Function fcInit Lib "FooBarApi.dll" () As Long
Private Declare Function fcSearchFooBar Lib "FooBarApi.dll" (ByVal xmlBefRecord As String, ByRef xmlLength As Long, ByVal nMode As Long) As Long
Private Declare Function fcDeleteFooBar Lib "FooBarApi.dll" (ByVal xmlBefRecord As String) As Long
Private Declare Function fcDeInit Lib "FooBarApi.dll" () As Long
It uses COM+.
Look at COM+ or .NET to link the two (VB and C)
I have used DCOM/COM+ for C++ -> VB and VB -> C++
Remember data passed will have varing limits (VB int != C int) and most likely be converted into VARIANTs or BSTR strings.