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. C / C++ / MFC
  4. activex + dll problem

activex + dll problem

Scheduled Pinned Locked Moved C / C++ / MFC
comc++helptutorialquestion
2 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hello! I'm trying to create a MFC dll that makes use of MS WebBrowser activeX component. Another application loads the library runtime and calls certain function that creates a dialog box with an explorer control. When creating the dialog box, however, the initialization of browser control fails, reporting CoCreateInstance of OLE control {8856F961-340A-11D0-A96B-00C04FD705A2} failed. >>> Result code: 0x800401f0 >>> Is the control is properly registered? Warning: CreateDlgControls failed during dialog init. In the dll initialization, I call AfxEnableControlContainer(). If I build an EXE that creates a simple dialog with explorer control, it runs just fine, but if I try to use it in a DLL, things don't work out. Any ideas how to make it work?

    D 1 Reply Last reply
    0
    • L Lost User

      Hello! I'm trying to create a MFC dll that makes use of MS WebBrowser activeX component. Another application loads the library runtime and calls certain function that creates a dialog box with an explorer control. When creating the dialog box, however, the initialization of browser control fails, reporting CoCreateInstance of OLE control {8856F961-340A-11D0-A96B-00C04FD705A2} failed. >>> Result code: 0x800401f0 >>> Is the control is properly registered? Warning: CreateDlgControls failed during dialog init. In the dll initialization, I call AfxEnableControlContainer(). If I build an EXE that creates a simple dialog with explorer control, it runs just fine, but if I try to use it in a DLL, things don't work out. Any ideas how to make it work?

      D Offline
      D Offline
      DVryce
      wrote on last edited by
      #2

      I'm not an MFC newbie and I'm still having the same exact problem with a different ActiveX control. I've been told that you also need to make a call to AfxOleInit() in the DLL initialization, but I've done that and it hasn't helped me a bit. Nobody so far has been able to help me solve this problem and it's really becoming frustrating. Let me know if you find a solution.

      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