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. COM
  4. Calling a COM object in an MFC exe

Calling a COM object in an MFC exe

Scheduled Pinned Locked Moved COM
c++comwindows-adminquestion
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.
  • A Offline
    A Offline
    Aza
    wrote on last edited by
    #1

    Hi, I have an MFC application (exe) containing an ATL COM object (ATL support added to the project). that I want to be able to use from another application. I have created a proxy/stub dll and registered both in the registry but when I try to create an instance of the object it returns E_FAIL. What could I be doing wrong? Johannes

    R 1 Reply Last reply
    0
    • A Aza

      Hi, I have an MFC application (exe) containing an ATL COM object (ATL support added to the project). that I want to be able to use from another application. I have created a proxy/stub dll and registered both in the registry but when I try to create an instance of the object it returns E_FAIL. What could I be doing wrong? Johannes

      R Offline
      R Offline
      Rashid Thadha
      wrote on last edited by
      #2

      Start from the top Have you called

      if (!AfxOleInit())
      return TRUE;

      from your MFC app (called from InitInstance) ?

      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