PLS HELP : CoCreateInstance on IE object failed on XP/SP2
-
Hi, Here is the part of the EXE code: if (FAILED (CoInitialize (NULL))) { return FALSE; } ... ... HRESULT hr; IWebBrowser2* pWebBrowser = NULL; hr = CoCreateInstance (CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, IID_IWebBrowser2, (LPVOID*)&pWebBrowser); ====> hr is 0x80070005 - Access is denied. This is happening only with Windows XP/SP2. On the same PC with SP1, it works fine also it works fine on W2K. Can someone PLEASE help me to solve this issue? Thanks SenPy
-
Hi, Here is the part of the EXE code: if (FAILED (CoInitialize (NULL))) { return FALSE; } ... ... HRESULT hr; IWebBrowser2* pWebBrowser = NULL; hr = CoCreateInstance (CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, IID_IWebBrowser2, (LPVOID*)&pWebBrowser); ====> hr is 0x80070005 - Access is denied. This is happening only with Windows XP/SP2. On the same PC with SP1, it works fine also it works fine on W2K. Can someone PLEASE help me to solve this issue? Thanks SenPy
What are you trying to do with IE? If you're hosting a WebBrowser control then
CLSCTX_LOCAL_SERVER
is the wrong context, useCLSCTX_INPROC_SERVER
instead. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- Come quietly or there will be... trouble. -
What are you trying to do with IE? If you're hosting a WebBrowser control then
CLSCTX_LOCAL_SERVER
is the wrong context, useCLSCTX_INPROC_SERVER
instead. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- Come quietly or there will be... trouble.