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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. COM
  4. DllMain issues

DllMain issues

Scheduled Pinned Locked Moved COM
c++comquestion
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.
  • M Offline
    M Offline
    Matt Gates
    wrote on last edited by
    #1

    I am new to COM and am building a simple MFC dll to get things going. I have everything working except that when I include DllMain in my code the linker balks and tells me that dllmain is already defined in my .obj file. Any ideas? TIA. Matt (Padawan Learner)

    M 1 Reply Last reply
    0
    • M Matt Gates

      I am new to COM and am building a simple MFC dll to get things going. I have everything working except that when I include DllMain in my code the linker balks and tells me that dllmain is already defined in my .obj file. Any ideas? TIA. Matt (Padawan Learner)

      M Offline
      M Offline
      MultiThread
      wrote on last edited by
      #2

      Greets, If I'm not mistaken, MFC has its own DllMain hidden deep down inside. Perhaps you should find it (since the code is included) and mimic what it does inside in order to support MFC in your COM object. However, this might already have been done in the past. Regards, Joe

      M 1 Reply Last reply
      0
      • M MultiThread

        Greets, If I'm not mistaken, MFC has its own DllMain hidden deep down inside. Perhaps you should find it (since the code is included) and mimic what it does inside in order to support MFC in your COM object. However, this might already have been done in the past. Regards, Joe

        M Offline
        M Offline
        Matt Gates
        wrote on last edited by
        #3

        Thanks. That got me thinking that my project was not setup as it should be. And low and behold it was not. I needed to be using a MFC Extension dll. Everything works great now. Dumb mistake, but like I said, I am new to COM(and to dlls). Matt (Padawan Learner)

        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