-
December 10th, 2000, 03:20 AM
#1
If an ActiveX control is not registered, how to run a program with it?
When I develop a program with an ActiveX control, I can run it in my own PC well. However, in another PC with this ActiveX control not registered, I cannot run it correctly, since I cannot see the ActiveX control where it should be.
Would you please help me? Thanks in advance.
-
December 10th, 2000, 03:54 AM
#2
Re: If an ActiveX control is not registered, how to run a program with it?
You can't run the program with unregistered ActiveX. Use regsvr32 myactx.ocx to register it before.
Rating isn't important...But gurus respect it and keep high
-
December 11th, 2000, 12:45 AM
#3
Re: If an ActiveX control is not registered, how to run a program with it?
Thanks. But I would like to know how my software user runs the program, because I don't expect him to register the associated ActiveX control before he begin to use the software.
-
December 11th, 2000, 03:35 AM
#4
Re: If an ActiveX control is not registered, how to run a program with it?
It means, that you have to use your ActiveX via COM server way. CoInitialize, CoCreateInstance, etc...
Rating isn't important...But gurus respect it and keep high
-
December 11th, 2000, 06:56 AM
#5
Re: If an ActiveX control is not registered, how to run a program with it?
Try this:
HINSTANCE h = LoadLibrary( "xxxxxx.DLL" );
if ( h == NULL )
{
AfxMessageBox( "unable to load 'xxxxxx.DLL'." );
return;
}
typedef int ( *REG ) ( void );
REG f_reg = ( REG ) GetProcAddress( h , "DllRegisterServer" );
if ( f_reg == NULL )
{
FreeLibrary( h );
AfxMessageBox( "unable to load 'DllRegisterServer' in 'xxxxxxx.DLL'." );
return;
}
f_reg();
FreeLibrary( h );
crux
-
December 15th, 2000, 02:00 AM
#6
Re: If an ActiveX control is not registered, how to run a program with it?
I think you have solved my problem. Thank you very much.
-
May 18th, 2009, 09:14 AM
#7
Re: If an ActiveX control is not registered, how to run a program with it?
Hello,
i have the same problem with the activex control. In my program I used the same code for registering the control files, but the return value of LoadLibrary() was always NULL. I have administrator access on the pc. Any advices how to solve the problem?
Thanks in advance,
L
-
May 18th, 2009, 03:37 PM
#8
Re: If an ActiveX control is not registered, how to run a program with it?
Well, the MSDN says to call GetLastError to find out why the function returned NULL.
Viggy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|