View Full Version : Register .NET as COM server
PodHunter
02-06-2014, 01:49 PM
I have a .NET DLL and an associated TLB. The command line to register the DLL as a COM server is...
%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\re gasm /codebase DgnChronographer.dll /tlb:DgnChronographer.tlb
I found the Register File Operation macro, but I don't see how to specify the /tlb and /codebase switches as shown above.
Regards, Jon Summers
linder
02-07-2014, 04:02 AM
Jon,
Would it be possible for you to send the files to our support [at] lindersoft [dot] com so we can check this? Could you also send your .sb8 project so we can see how you register?
In theory, the "COM Interop Register (/codebase) .NET Assembly immediately" option should do it.
Thanks,
Friedrich
PodHunter
02-07-2014, 08:18 AM
When one uses .NET to create a DLL that is a COM server, .NET creates a .TLB file of the same name. .NET doesn't integrate the TLB with the implementation file as it does when one builds an ATL COM server.
The registration processes uses two switches:
\codebase
\tlb
codebase specifies the DLL
tlb specifies the TLB
I'll mail a ZIP with the .sb8 (work in progress) .dll and .tlb files, along with the register.bat file.
linder
02-07-2014, 08:25 AM
Yes, the installer runtime automatically makes use of the two switches. For example, it executes the following:
regasm /tlb:NETServer.tlb NETServer.dll
The user has to install both .tlb and .dll files.
Friedrich
PodHunter
02-10-2014, 06:40 AM
regasm /tlb:NETServer.tlb NETServer.dll
Thanks! Doesn't the DLL require the /codebase switch?
linder
02-10-2014, 07:17 AM
Hello,
Item is still in review. Under certain circumstances, the runtime calls regasm with:
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\rega sm.exe" /codebase /tlb: "C:\Program Files\LA Solutions\DgnChronographer\DgnChronographer.tlb" "C:\Program Files\LA Solutions\DgnChronographer\DgnChronographer.dll"
But it should look like:
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\rega sm.exe" "C:\Program Files\LA Solutions\DgnChronographer\DgnChronographer.dll" /codebase /tlb: DgnChronographer.tlb
Perhaps this causes the issue in your case.
Friedrich
linder
02-11-2014, 05:53 AM
Jon,
Could you please test the pre-release? Does it work now?
Thanks,
Friedrich
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.