Hai,
Is it possible to load the ActiveX Control using LoadLibray, or any other way to load the ActiveX Control at the run-time. Please give some reference or links to know the details.
Thanks in Advance.
Printable View
Hai,
Is it possible to load the ActiveX Control using LoadLibray, or any other way to load the ActiveX Control at the run-time. Please give some reference or links to know the details.
Thanks in Advance.
hi,
activex Control are self registrable DLL. you do not need LoadLibray for them
just create the object it will be loaded automatically. of course you need to register it by regsvr32 at command prompt.
regards
deepak
Thank you Mr Deepak,
I know that. but My problem is different. I am developing a software with different user privileges. I have the ActiveX control with different version. Depending upon the privilege level of the user i have to register the particular version at the time of user login. so that i am asking, the registration procedure through the program itself.
interface IComponentRegistrar : IDispatch
{
[id(1)] HRESULT Attach([in] BSTR bstrPath);
[id(2)] HRESULT RegisterAll();
[id(3)] HRESULT UnregisterAll();
[id(4)] HRESULT GetComponents([out] SAFEARRAY(BSTR)* pbstrCLSIDs, [out] SAFEARRAY(BSTR)* pbstrDescriptions);
[id(5)] HRESULT RegisterComponent([in] BSTR bstrCLSID);
[id(6)] HRESULT UnregisterComponent([in] BSTR bstrCLSID);
};
This Interface will help u
Just implement it
u will get this as obj in ATL Wizard as ATL Object
u will get implementation also