Re: Registering COM DLLs in Set projects

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Bruce Wood" <brucewood@xxxxxxxxxx> wrote in message
news:1139875108.320450.253350@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Can anyone explain to me (in simple terms, please :) ) what is the
difference between setting the Register property for a DLL in a Setup
project to COM versus COMRelativePath versus COMSelfReg?

I know next to nothing about COM, and I find the MSDN help page:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxgrfregisterproperty.asp

completely unilluminating.

I assume that there is some way that I can look at / test a DLL to see
which one of these three I should use for it... how do I figure it out?

Com dlls need to add entries to the registry to allow programs to find and
use them. The dll will add these entries when a function it exports called
DllRegisterServer is called, you can see this function if you view the dll
in dependancy viewer. You can call the function manually by typing "regsvr32
mydll.dll". In the past most installers have called DllRegisterServer when
installing com files but that has become a problem on machines with
restricted access to HLEY_LOCAL_MACHINE. The "solution" to this was to
obtain a list of all the keys the dll creates and have the installer add
these keys to HKEY_CURRENT_USER instead. The problem with this is that it is
only helpful to the currently logged in user and I don't see how it would
get a complete list of the registry keys as the dll is free to add any keys
it likes.

The short answer is run regsvr32 on each dll and if it reports success just
set them to self register and warn if the user has inadequate permissions.

Michael


.



Relevant Pages

  • RE: Registering a custom DLL after deployment - advice?
    ... Register property to vsdraCOM - and leave the output as content ... I added the dll and the tlb and set the build action to ... publishing and invoke the .bat file. ... The custom dll is for the Access ADP. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Self registering a COM dll in a VS2003 Windows setup project...
    ... Most of the Register settings extract the settings at build time and put the ... at install time. ... code in that DLL is doing something that isn't being put into the MSI file. ... I have not been able to make a customized Redemption dll ...
    (microsoft.public.dotnet.framework.setup)
  • Re: IMailRuleClient wont work!!!
    ... Does your DLL properly export DllRegisterServer and DllGetClassObject? ... > So i have tested manually register the COM. ...
    (microsoft.public.pocketpc.developer)
  • Re: Fail to create IXSSO.Query object
    ... It errored out after I registered DLL in WOW64. ... "Dan" wrote: ... Can you switch IIS back to 64-bit mode and see if that then works? ... I also will try to register the dll again. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Com Add-in Question?
    ... When you say you don't have the dll set to self register what do you ... I also ensure that these keys have been ...
    (microsoft.public.outlook.program_addins)