CreateInstance() returns: 0x80080005, while creating an Instance of running Com server (EXE)

0

CreateInstance() is returning 0x80080005 every time, when I am trying to create an Instance of running Com server (EXE). If the COM server is not running, CreateInstance() call get success every time and opens the COM server successfully.

For example: if I manually run the Com Server(exe), then I am not able to create instance of it.

Why I am not able to create an instance of running Com Server? Please help.

CoInitializeEx(NULL, COINIT_MULTITHREADED);

HRESULT hr = assistMgr.CreateInstance(__uuidof(AssistManager::AssistManagerApp));

if (SUCCEEDED(hr))
       printf ("%s: Create Instance Successful", __FUNCTION__);
else
       printf("%s: Unable to create object - 0x%X", __FUNCTION__, hr);
c++
c
windows
winapi
com
asked on Stack Overflow Oct 15, 2020 by Kuldeep Kumar

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0