Board index » cppbuilder » Registre ActiveX ?

Registre ActiveX ?


2005-01-26 04:08:07 PM
cppbuilder110
Hello,
I want regiter an AvtiveX in source code , how can do it ?
Thanks,
M.T
 
 

Re:Registre ActiveX ?

"Sasan" < XXXX@XXXXX.COM >wrote in message
Quote
I want regiter an AvtiveX in source code , how can do it ?
If the control is in an EXE file, then execute the EXE with the "/regserver"
command line parameter. If the control is in a DLL, then load the DLL via
LoadLibrary() and call its DllRegisterServer() function via
GetProcAddress().
Gambit
 

Re:Registre ActiveX ?

Hello,
I have an OCX file ,
how do it ?
Thanks,
 

{smallsort}

Re:Registre ActiveX ?

"Sasan" < XXXX@XXXXX.COM >wrote in message
Quote
I have an OCX file ,
how do it ?
An OCX is just a DLL with a different file extension.
Gambit
 

Re:Registre ActiveX ?

Hello,
Thanks for your help, i have 1 question :
How can call procedure that find with GetProcAddress ?
Thanks.
 

Re:Registre ActiveX ?

"Sasan" < XXXX@XXXXX.COM >wrote in message
Quote
How can call procedure that find with GetProcAddress ?
typedef HRESULT __stdcall (*LPFN_DLLRS)(void);
HINSTANCE hOCX = LoadLibrary("somefile.ocx");
if( hOCX)
{
LPFN_DLLRS lpDllRegisterServer = (LPFN_DLLRS) GetProcAddress(hOCX,
"DllRegisterServer");
if( lpDllRegisterServer )
lpDllRegisterServer();
FreeLibrary(hOCX);
}
Gambit