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. COM Wrapper for C++ DLL

COM Wrapper for C++ DLL

Scheduled Pinned Locked Moved COM
c++comsysadminhelpquestion
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.
  • J Offline
    J Offline
    James Smith
    wrote on last edited by
    #1

    Hi all, I have a C++ DLL that I "think" I need to make COM aware to make it work on both 32 and 64 bit windows processors. According to Microsoft site: "On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL. However, 64-bit Windows supports remote procedure calls (RPC) between 64-bit and 32-bit processes (both on the same computer and across computers). On 64-bit Windows, an out-of-process 32-bit COM server can communicate with a 64-bit client, and an out-of-process 64-bit COM server can communicate with a 32-bit client. Therefore, if you have a 32-bit DLL that is not COM-aware, you can wrap it in an out-of-process COM server and use COM to marshal calls to and from a 64-bit process." (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/process\_interoperability.asp)" Unfortunately, I don't have a whole lot of COM experience. Can anyone point me at some resource to help me out with this project? Anyone with good/bad experience doing this type of wrapper? Any suggestion, or help would be greatly appreciated. Thank you in advance, James

    L 1 Reply Last reply
    0
    • J James Smith

      Hi all, I have a C++ DLL that I "think" I need to make COM aware to make it work on both 32 and 64 bit windows processors. According to Microsoft site: "On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL. However, 64-bit Windows supports remote procedure calls (RPC) between 64-bit and 32-bit processes (both on the same computer and across computers). On 64-bit Windows, an out-of-process 32-bit COM server can communicate with a 64-bit client, and an out-of-process 64-bit COM server can communicate with a 32-bit client. Therefore, if you have a 32-bit DLL that is not COM-aware, you can wrap it in an out-of-process COM server and use COM to marshal calls to and from a 64-bit process." (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/process\_interoperability.asp)" Unfortunately, I don't have a whole lot of COM experience. Can anyone point me at some resource to help me out with this project? Anyone with good/bad experience doing this type of wrapper? Any suggestion, or help would be greatly appreciated. Thank you in advance, James

      L Offline
      L Offline
      lemur2
      wrote on last edited by
      #2

      Go to the COM and/or ATL section of code project. There are plenty of tutorials there. I've not done a wrapper for this explicit reason, but I've wrapped other DLLs before and its no big problem. The simplest way is to use the ATL Appwizard assuming you're using VC++. Kev

      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