How to use C Business Function to call VB DLL.

jamest

Member
I have created a DLL using Visual Baisc. This Dll can display a form.
The function of dll is :
Public Function c() As Integer
Then I create a C business function as following:
#include <jde.h>
#define vbfun_c
#include <vbfun.h>
typedef int(*_vbfun1)();
HINSTANCE hLibrary;
_vbfun1 vbfun11;
int shuchu;
JDEBFRTN (ID) JDEBFWINAPI show (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD0000008 lpDS)
{ if ((lpBhvrCom == (LPBHVRCOM) NULL) ||(lpVoid == (LPVOID) NULL) ||(lpDS == (LPDSD0000008) NULL))
{
jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, "4363", (LPVOID) NULL);
return ER_ERROR;
}
hLibrary=LoadLibrary("E:\vbdll\1\vbfun.dll");
vbfun11=(_vbfun1)GetProcAddress(hLibrary,"c");
shuchu=(*vbfun11)();
FreeLibrary(hLibrary);
return (ER_SUCCESS);
}
In OWM, I build the C business function without any problem.
But when I use interactive application to call this function, it returns nothing.
Why? Is the code of C business function or the DLL wrong?
Need your help!
Thank you!
 
Back
Top