+ Reply to Thread
Results 1 to 7 of 7

Thread: Register .NET as COM server

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2013
    Location
    Devon, United Kingdom
    Posts
    27

    Default Register .NET as COM server

    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 /tlbgnChronographer.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

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Register .NET as COM server

    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

  3. #3
    Join Date
    Nov 2013
    Location
    Devon, United Kingdom
    Posts
    27

    Default Register .NET as COM server

    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.

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Register .NET as COM server

    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

  5. #5
    Join Date
    Nov 2013
    Location
    Devon, United Kingdom
    Posts
    27

    Default Re: Register .NET as COM server

    Quote Originally Posted by linder View Post
    regasm /tlb:NETServer.tlb NETServer.dll
    Thanks! Doesn't the DLL require the /codebase switch?

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Register .NET as COM server

    Hello,

    Item is still in review. Under certain circumstances, the runtime calls regasm with:

    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\reg asm.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\reg asm.exe" "C:\Program Files\LA Solutions\DgnChronographer\DgnChronographer.dll" /codebase /tlb: DgnChronographer.tlb

    Perhaps this causes the issue in your case.

    Friedrich

  7. #7
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Register .NET as COM server

    Jon,

    Could you please test the pre-release? Does it work now?

    Thanks,
    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •