Using ActiveX DLL Created in VB

sanps

Member
Dear Friedns,
I created DLL in VB which creates Pivot Table in Excel, I want to call this from JDE BSFN. Is this practically possible? If yes how to achive this? Purpose behind this to generate report in excel in Pivot Table Format from JDE.

Reagrds,
Sandeep
Oneworld Xe, SP 17, Win NT 4.0
 
There are many ways to do this but the simplest way is to use jdeLoadLibrary
function.
JDERTN (HINSTANCE) JDEWINAPI jdeLoadLibrary(LPSTR lpszLibFileName);
JDERTN (FARPROC) JDEWINAPI jdeGetProcAddress(HMODULE hModule,LPCSTR
lpszProc);
JDERTN (void) JDEWINAPI jdeFreeLibrary(HINSTANCE hModule);

BTW JDE support most of win32 apis.

Enjoy
OW Hell
 
Re: RE: Using ActiveX DLL Created in VB

Thanks OWHell.
But I am still having queries. I am begineer to business function programming. I searched about these functions in knowledge garden but not able to find help. Are these functions applicable for Oneworld Xe, SP 17 on Win NT Platform? Please guide me.
Thanks Again.
Sandeep
 
Thanks OWHell.
But I am still having queries. I am begineer to business function programming. I searched about these functions in knowledge garden but not able to find help. Are these functions applicable for Oneworld Xe, SP 17 on Win NT Platform? Please guide me.
Thanks Again.
Sandeep
 
RE: RE: Using ActiveX DLL Created in VB

Sandeep,

If you are sure of the platform to be Windows NT then use windows APIs
LoadLibrary, GetProcAddress and FreeLibrary


OW Hell
 
Re: RE: RE: Using ActiveX DLL Created in VB

Hi,

This question was answered before in this forum:

Yes you can do that. But the problem with a VB-DLL is that it doesn't export its functions. There are some programs doing this kind of thing, they take you VB and create a small DLL with the functions you want to call: i've used the tools from Desaware (http://www.desaware.com) and it works great.
In Oneworld you need to create a C-function where you call your DLL.
E.g.:
hInst = LoadLibrary("myvb.dll");

if ( hInst != NULL )
{
lpPrintDoc = (LPPRINTDOC) GetProcAddress((HMODULE)hInst, "functioninDLL");

succes,

Walter.
 
Back
Top