Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. PLS HELP : CoCreateInstance on IE object failed on XP/SP2

PLS HELP : CoCreateInstance on IE object failed on XP/SP2

Scheduled Pinned Locked Moved ATL / WTL / STL
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SenPy
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • S 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

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      What are you trying to do with IE? If you're hosting a WebBrowser control then CLSCTX_LOCAL_SERVER is the wrong context, use CLSCTX_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.

      S 1 Reply Last reply
      0
      • M Michael Dunn

        What are you trying to do with IE? If you're hosting a WebBrowser control then CLSCTX_LOCAL_SERVER is the wrong context, use CLSCTX_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.

        S Offline
        S Offline
        SenPy
        wrote on last edited by
        #3

        Hi, I am trying to navigate to a particular web site and populate the web form fields from my MFC application. BTW, this code works fine on W2K and XP/SP1. Regards SenPy

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups