COM dll connect to console client
-
hi this is suresh........... i have written a comdll using Win32 dynamic link library.so the dll has run without Bugs, next my client in console....... #include #include #include "iids.h" #include "interface.h" void main() { CoInitialize(NULL); I1* p1=NULL; HRESULT hr=CoCreateInstance(CLSID_D,NULL,CLSCTX_ALL,IID_I1,(void**)&p1); if(FAILED(hr)) { cout<<"sorry component cannot be created "<<endl; } p1->f1(); I2 *p2; p1->QueryInterface(IID_I2,(void**)&p2); p2->f2(); p1->Release(); p2->Release(); CoUninitialize(); } so finally i cannot co-create the component
-
hi this is suresh........... i have written a comdll using Win32 dynamic link library.so the dll has run without Bugs, next my client in console....... #include #include #include "iids.h" #include "interface.h" void main() { CoInitialize(NULL); I1* p1=NULL; HRESULT hr=CoCreateInstance(CLSID_D,NULL,CLSCTX_ALL,IID_I1,(void**)&p1); if(FAILED(hr)) { cout<<"sorry component cannot be created "<<endl; } p1->f1(); I2 *p2; p1->QueryInterface(IID_I2,(void**)&p2); p2->f2(); p1->Release(); p2->Release(); CoUninitialize(); } so finally i cannot co-create the component
And what was the error? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke