Search code examples
visual-studio-2010dllregistryarcgistypelib

Register dll/tlb


I'm attempting to register a GIS based dll on a test computer and I'm having problems loading in the tlb file with ArcGIS 9.3.1 - ArcMap on the test computer. When I attempt to load the tlb file is says "No New Objects Added". I created the dll file using Visual Studio 2010. The tlb file loads fine on my developer computer. I'm registering the dll/tlb on the test computer by using cmd.exe command (see below).

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe C:\Temp\My.dll /tlb:My.tlb/codebase

The registration replies as successful and the item is listed in the Component Category under the MX Commands category. Below is the COM GUIDs portion code that I'm using within my class.

#Region "COM GUIDs"
    Public Const ClassId As String = "1bf94bdf-907c-4026-816f-50feb7a2a976"
    Public Const InterfaceId As String = "7ba8a4d5-d15c-4d95-a819-a3e7cbe84533"
    Public Const EventsId As String = "2ab51582-47e1-490c-899d-a80992c20fdf"
#End Region

The OS of the developer computer is:

Microsoft Windows XP 32bit, Version 5.1 - Service Pack 3

AND

The OS of the test computer is:

Microsoft Windows XP 64bit, Version 5.2 - Service Pack 2

Do I need to do a Windows Update on the developer computer (to 5.2) or is there something wrong in my dll/tlb registration method?

Thanks for your help!

UPDATE:

The ArcGIS software on the test computer is installed under the C:\Program Files (x86) location.


Solution

  • I think you need to register it using the 64-bit version of RegASM on your target PC. You should find it in:

    C:\Windows\Microsoft.NET\Framework64\v2.0.50727
                                      ^^
    

    Note that I'm assuming that you have compiled your code to MSIL (by selecting AnyCPU as the platform). If you have compiled it to target 32-bit, then you will need to change that.

    This is because a 64-bit process cannot find registrations performed by the 32-bit version of RegAsm, and vice-versa.