How to load a ActiveX Dll Dynamically by specifying the dll name
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
:laugh::-D#include #import "C:\Project1.dll" no_namespace class RemoteDllLoader { _Class1Ptr ptr; public: RemoteDllLoader() { try { CoInitialize(NULL); ptr.CreateInstance(__uuidof(Class1)); } catch(_com_error &e) { _bstr_t err = e.Description(); MessageBox(NULL,err,"Error",0); } } ~RemoteDllLoader() { CoUninitialize(); } void Test() { ptr->Test1("Hi"); } int Test2(int n1,int n2) { return ptr->Test2(n1,n2); } }; this is the code that i used to load an activex dll.but I want to load a particular dll by specifying it dll name given by a parameter.Can it be possible? I appreciate any possible answer.Thnxs Viraj Siriwardana