1

Following is the scenario:

We received the following files from our VC++ team:

a.exe a.tlb

We used tlbimp.exe to generate a .net dll from a.tlb, say a.dll.

We referred this newly generated dll in our .net application and everything is working fine.

My question: Though we haven't registered this com exe (a.exe) anywhere, how is the generated .net dll (a.dll) working fine? How is this connection made?

With COM dlls, we used to register the COM dll and then use tlbimp to generate a .net dll from the COM and used to refer the generated .net dll in our project. This I can understand beccause the generated .net dll stores the GUID of the COM and can locate the COM using system registry. However, I am not able to understand how the scenario that I mentioned in the beginning working.

Thanks in advance.

VividD
  • 10,456
  • 6
  • 64
  • 111
Tech Solver
  • 513
  • 1
  • 5
  • 16
  • Do you mean you don't understand how the .exe is started? Because COM starts it when you create the COM object this .exe serves. – Simon Mourier Jun 21 '13 at 14:12

1 Answers1

0

It could be done using a regfree com, this enables locating the assembly using such a manifest file which defines the identity of an assembly.

Take a look at Registration-Free Activation of COM Components: A Walkthrough

CloudyMarble
  • 36,908
  • 70
  • 97
  • 130
  • The link says that this feature is supported only in Win XP and Win Server 2003 platforms. How about Win 7 (32 and 64 bit)? – Tech Solver Jun 21 '13 at 08:24
  • did not try it, but should actually work, see here: http://stackoverflow.com/a/5056472/395659 – CloudyMarble Jun 21 '13 at 08:37
  • It seems we are not using regfree com because I don't see any manifest files at all in the files provided by the VC++ team. We just created the interop using the tlbimp.exe from the .tlb file. – Tech Solver Jun 21 '13 at 11:07