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. Registering Proxy/stub DLL

Registering Proxy/stub DLL

Scheduled Pinned Locked Moved COM
questionc++comsysadminwindows-admin
4 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.
  • D Offline
    D Offline
    David_Leikis
    wrote on last edited by
    #1

    I have created a marshaling proxy/stub DLL to handle the custom data interfacing of a COM object. The COM is a .exe and I am having trouble getting the marshaller to work during deploy. If I install the C++ application and COM server on a target machine and register the components this way... (COM server is SPDCom) c:\TARGETFOLDER\SPDCom.exe /Regserver regsvr32 c:\TARGETFOLDER\SPDComPS.dll The COM object is started and running in memory properly by the application, but I do not get any data from the Proxy/Stub. (Just the first data item in the passed arrays.) I was only able to get the project to work well after using VC++ 6.0 to build and register the SPDComPS project on the target machine. Before I built and registered the PS project, I did verify that the PS was registered in the registry with all of it's GUIDs. Finally, with this background, my question is: What is the difference between registering using regsvr32 from the 'RUN' prompt and from within VC++? (That seems to be the only difference!) David Leikis ATK Thiokol Propulsion

    R 1 Reply Last reply
    0
    • D David_Leikis

      I have created a marshaling proxy/stub DLL to handle the custom data interfacing of a COM object. The COM is a .exe and I am having trouble getting the marshaller to work during deploy. If I install the C++ application and COM server on a target machine and register the components this way... (COM server is SPDCom) c:\TARGETFOLDER\SPDCom.exe /Regserver regsvr32 c:\TARGETFOLDER\SPDComPS.dll The COM object is started and running in memory properly by the application, but I do not get any data from the Proxy/Stub. (Just the first data item in the passed arrays.) I was only able to get the project to work well after using VC++ 6.0 to build and register the SPDComPS project on the target machine. Before I built and registered the PS project, I did verify that the PS was registered in the registry with all of it's GUIDs. Finally, with this background, my question is: What is the difference between registering using regsvr32 from the 'RUN' prompt and from within VC++? (That seems to be the only difference!) David Leikis ATK Thiokol Propulsion

      R Offline
      R Offline
      Roger Stoltz
      wrote on last edited by
      #2

      David_Leikis wrote: What is the difference between registering using regsvr32 from the 'RUN' prompt and from within VC++? There is no difference, it still is the RegSvr32 that is used even if called from the DevStudio IDE. However, if you don't alter the "Tools->Register control" command in DevStudio, RegSvr32 is run from your target directory and always puts quotation marks on each side of the path to your server. Since it works when you build the application on the target machine you might have been missing some files that were installed with DevStudio. Hope this helps -- Roger

      D 1 Reply Last reply
      0
      • R Roger Stoltz

        David_Leikis wrote: What is the difference between registering using regsvr32 from the 'RUN' prompt and from within VC++? There is no difference, it still is the RegSvr32 that is used even if called from the DevStudio IDE. However, if you don't alter the "Tools->Register control" command in DevStudio, RegSvr32 is run from your target directory and always puts quotation marks on each side of the path to your server. Since it works when you build the application on the target machine you might have been missing some files that were installed with DevStudio. Hope this helps -- Roger

        D Offline
        D Offline
        David_Leikis
        wrote on last edited by
        #3

        After a few phone calls to Microsoft support, I got the answer to the problem of the Proxy/Stub not working and seeming to need to be registered with DevStudio. It seems that the Regsvr32 utility needs to have the COM object already installed BEFORE you install the PS!!! The bottom line is that the PS.DLL MUST be registered last! If you don't, there will never be any notification of error or warning, the COM object will fall back to standard marshalling and your custom marshalling PS.DLL will simply not be invoked. I just had my client register the PS.DLL again (last) and it worked immediately. -- modified at 9:00 Tuesday 11th October, 2005

        R 1 Reply Last reply
        0
        • D David_Leikis

          After a few phone calls to Microsoft support, I got the answer to the problem of the Proxy/Stub not working and seeming to need to be registered with DevStudio. It seems that the Regsvr32 utility needs to have the COM object already installed BEFORE you install the PS!!! The bottom line is that the PS.DLL MUST be registered last! If you don't, there will never be any notification of error or warning, the COM object will fall back to standard marshalling and your custom marshalling PS.DLL will simply not be invoked. I just had my client register the PS.DLL again (last) and it worked immediately. -- modified at 9:00 Tuesday 11th October, 2005

          R Offline
          R Offline
          Roger Stoltz
          wrote on last edited by
          #4

          Well, there's always a lesson to be learned.:cool: I didn't think if this either, but afterwards it's quite logical since when the server is registered (DllRegisterServer gets called from e.g. RegSvr32) it simply writes registry values not knowing anything about the proxy/stub dll. Nice of you to share the explanation. Thanks. -- Roger

          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