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. MFC COM dll

MFC COM dll

Scheduled Pinned Locked Moved C / C++ / MFC
c++comtestingtoolstutorial
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.
  • S Offline
    S Offline
    sawerr
    wrote on last edited by
    #1

    Hi When i create a MFC DLL with Automation option selected, wizard creates some functions for me. For example DllGetClassObject, DllRegisterServer If i add second com class to my dll, how must i change the CoGetClassObject, DllRegisterServer code? I see all the sample codes are about one class in one dll. i dont know what must be done if i want to add more than one class. Also i wonder this: If one dll contains 3 com class, it means there are 3 servers in one dll?

    M 1 Reply Last reply
    0
    • S sawerr

      Hi When i create a MFC DLL with Automation option selected, wizard creates some functions for me. For example DllGetClassObject, DllRegisterServer If i add second com class to my dll, how must i change the CoGetClassObject, DllRegisterServer code? I see all the sample codes are about one class in one dll. i dont know what must be done if i want to add more than one class. Also i wonder this: If one dll contains 3 com class, it means there are 3 servers in one dll?

      M Offline
      M Offline
      Matthew Faithfull
      wrote on last edited by
      #2

      It's hard to explain COM in a small book let a lone in a short post so the best thing I can do is say try it and see. Try creating 3 separate Dlls, one object in each with the wizard and see where the code is the same and where it's different and if you can combine them manually. Also the theory of COM is different from the implementation of COM objects within a framework like MFC or ATL. Framework implementation details like COM Maps can be very confusing if you don't already understand what they're trying to achieve. Learning by fiddling has always been the best way to learn programming and not just because that's how I did it.:-D

      Nothing is exactly what it seems but everything with seems can be unpicked.

      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