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. ATL / WTL / STL
  4. COM DLL Registration

COM DLL Registration

Scheduled Pinned Locked Moved ATL / WTL / STL
questionc++oraclecomwindows-admin
5 Posts 2 Posters 1 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.
  • H Offline
    H Offline
    HakunaMatada
    wrote on last edited by
    #1

    Hi all, Greetings and Salutations!! I have a problem registering COM DLL's. I use ATL to create COM components but the rgs files which ATL creates and the registration process of ATL seems to only register the DLL with HKEY_LOCAL_MACHINE. If I want to register the DLL using a Windows Guest user, it does not seem to register it. Now, I looked at skype and skype seems to install on both guest accounts and admin accounts. Ofcourse, Skype does use COM DLLs but it seems that the trick is to register the DLL within HKEY_CURRENT_USER. This seems to work for skype so why shouldn't it work for me? Ofcourse, the installation would only be available to the guest user but I am ok with that. My question is, can I just make changes to the rgs file and register the DLL with HKEY_CURRENT_USER or do I have to write routines of my own which makes entries in the registry? In short, is there any way other than writing your own code which can be used to register my COM DLL with HKEY_CURRENT_USER?? Thank You for your time.

    --- :beer: Hakuna-Matata :beer: It means no worries for the rest of your days... It's our problem free, Philosophy :jig: "I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."

    H J 2 Replies Last reply
    0
    • H HakunaMatada

      Hi all, Greetings and Salutations!! I have a problem registering COM DLL's. I use ATL to create COM components but the rgs files which ATL creates and the registration process of ATL seems to only register the DLL with HKEY_LOCAL_MACHINE. If I want to register the DLL using a Windows Guest user, it does not seem to register it. Now, I looked at skype and skype seems to install on both guest accounts and admin accounts. Ofcourse, Skype does use COM DLLs but it seems that the trick is to register the DLL within HKEY_CURRENT_USER. This seems to work for skype so why shouldn't it work for me? Ofcourse, the installation would only be available to the guest user but I am ok with that. My question is, can I just make changes to the rgs file and register the DLL with HKEY_CURRENT_USER or do I have to write routines of my own which makes entries in the registry? In short, is there any way other than writing your own code which can be used to register my COM DLL with HKEY_CURRENT_USER?? Thank You for your time.

      --- :beer: Hakuna-Matata :beer: It means no worries for the rest of your days... It's our problem free, Philosophy :jig: "I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."

      H Offline
      H Offline
      HakunaMatada
      wrote on last edited by
      #2

      I now seem to be able to update the rgs values into the HKCU key but now how do I register the Typelib of the COM DLL in HKCU???

      --- :beer: Hakuna-Matata :beer: It means no worries for the rest of your days... It's our problem free, Philosophy :jig: "I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."

      J 1 Reply Last reply
      0
      • H HakunaMatada

        Hi all, Greetings and Salutations!! I have a problem registering COM DLL's. I use ATL to create COM components but the rgs files which ATL creates and the registration process of ATL seems to only register the DLL with HKEY_LOCAL_MACHINE. If I want to register the DLL using a Windows Guest user, it does not seem to register it. Now, I looked at skype and skype seems to install on both guest accounts and admin accounts. Ofcourse, Skype does use COM DLLs but it seems that the trick is to register the DLL within HKEY_CURRENT_USER. This seems to work for skype so why shouldn't it work for me? Ofcourse, the installation would only be available to the guest user but I am ok with that. My question is, can I just make changes to the rgs file and register the DLL with HKEY_CURRENT_USER or do I have to write routines of my own which makes entries in the registry? In short, is there any way other than writing your own code which can be used to register my COM DLL with HKEY_CURRENT_USER?? Thank You for your time.

        --- :beer: Hakuna-Matata :beer: It means no worries for the rest of your days... It's our problem free, Philosophy :jig: "I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."

        J Offline
        J Offline
        Jonathan Davies
        wrote on last edited by
        #3

        HakunaMatada wrote:

        My question is, can I just make changes to the rgs file and register the DLL with HKEY_CURRENT_USER

        Why not change the HKCR in your .rgs to HKCU, build and register and have a look at the result with regedit? I'm assuming COM will look there for an entry.

        H 1 Reply Last reply
        0
        • H HakunaMatada

          I now seem to be able to update the rgs values into the HKCU key but now how do I register the Typelib of the COM DLL in HKCU???

          --- :beer: Hakuna-Matata :beer: It means no worries for the rest of your days... It's our problem free, Philosophy :jig: "I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."

          J Offline
          J Offline
          Jonathan Davies
          wrote on last edited by
          #4

          do you have a 'TypeLib' = s '{386515B1-2B6F-11D4-9048-004005719FF5}' (with your GUID)line in your .rgs file?

          1 Reply Last reply
          0
          • J Jonathan Davies

            HakunaMatada wrote:

            My question is, can I just make changes to the rgs file and register the DLL with HKEY_CURRENT_USER

            Why not change the HKCR in your .rgs to HKCU, build and register and have a look at the result with regedit? I'm assuming COM will look there for an entry.

            H Offline
            H Offline
            HakunaMatada
            wrote on last edited by
            #5

            Yes! Yes! I got it! Eureka! :-) I made changes to the .rgs file so that the coclasses are registered with HKCU.

            HKCU
            {
            Software
            {
            Classes
            {
            .....
            }
            }
            }

            Then I rewrote the

            CComModule.RegisterServer()

            function to register the type library using

            RegisterTypeLibForUser

            . That did the trick. Thanks for your help!

            --- :beer: Hakuna-Matata :beer: It means no worries for the rest of your days... It's our problem free, Philosophy :jig: "I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."

            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