VB DLL for C App
-
Thanks in advance, I'm trying to author a DLL plugin for an existing application that was written in C. In other words, the C code can not change. Unfortunately, the app doesn't implement COM and I'm writing the DLL in VB6 which only implements ActiveX DLL (using COM). The app does support loading all the DLL's in a certain directory and I've got a sample header file for the function call syntax. Unfortunately, I know VB and not C so I'm trying to convert the header into VB. I've found a way to export the functions from my DLL and the calling app does recognize them, so step 1 is out of the way. The next step is to manually initialize COM on the calling thread so VB will play nice? Then TLS can be loaded? I think these are the correct steps but obviously, I'm having implementing them. Does anybody have any leads, examples and/or links where I can learn about this more? Surely somebody has written VB plugins for a C app? :confused: Thanks Joe
-
Thanks in advance, I'm trying to author a DLL plugin for an existing application that was written in C. In other words, the C code can not change. Unfortunately, the app doesn't implement COM and I'm writing the DLL in VB6 which only implements ActiveX DLL (using COM). The app does support loading all the DLL's in a certain directory and I've got a sample header file for the function call syntax. Unfortunately, I know VB and not C so I'm trying to convert the header into VB. I've found a way to export the functions from my DLL and the calling app does recognize them, so step 1 is out of the way. The next step is to manually initialize COM on the calling thread so VB will play nice? Then TLS can be loaded? I think these are the correct steps but obviously, I'm having implementing them. Does anybody have any leads, examples and/or links where I can learn about this more? Surely somebody has written VB plugins for a C app? :confused: Thanks Joe
-
if the C code can not be change, then you how invoke the VB DLL in your C app? K-PAX? CHANGE THE WAY YOU LOOK AT YOURSELF, OTHERS & THE WORLD...
-
K-PAX, Thanks for responding. As mentioned in my original message, "The app does support loading all the DLL's in a certain directory". Thanks Joe
;P i miss that. As you have the header file for the DLL export function prototype which going to load by the C app. So i guest developing the Dll with C/C++ is the choise. As VB can not create normal WIN32 DLL as the LoadLibrary API need a valid dll entry point which does not generated in VB ActiveX Dll. K-PAX? CHANGE THE WAY YOU LOOK AT YOURSELF, OTHERS & THE WORLD...