OK, thanks so far...getting closer. When I was initially working on the extensions, I registered them on my development machine by bringing up ArcMap and choosing Customize -> Customize Mode -> Add from File and then selecting the TLB file. This was before I had any of the COM Registration Functions in my classes so might be the reason that its working on my development maching and not a production machine.On my development machine, the GUID for the Class which defines the interface that I want to call is in HKLM\Software\Classes\Interface. On the production machine the GUID for the Class which defines the interface that I want to call is in HKLM\Software\Classes\CLSID (Note: There may be garbage in the registry on this machine from when the extensions were in VB6 against Arc 9.3). So I figure my registration functions are not correct. If I'm reading the documentation right, it looks like there are 2 places in each class that I need information. At the top of the class I have:
<GuidAttribute("EBAF6DBE-7E4F-45F8-B56B-AD9024E5F46A"), _
ClassInterface(ClassInterfaceType.None), _
ProgId("AGISExtension.cAGISExtension"), _
ComVisible(True)> _
Public Class cAGISExtension
Implements IAGISExtension
Implements ESRI.ArcGIS.esriSystem.IExtension
And then:
#Region "COM Registration Functions"
' Add the registration funcions that will be executed when ESRIRegAsm is
' run on the generated dll. This will register with the ArcMap
' extensions category.
<ComRegisterFunction(), ComVisible(False)> _
Shared Sub RegisterFunction(ByVal registerType As Type)
Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
MxExtension.Register(regKey)
End Sub
<ComUnregisterFunction(), ComVisible(False)> _
Shared Sub UnregisterFunction(ByVal registerType As Type)
Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
MxExtension.Unregister(regKey)
End Sub
#End Region
Not sure why the ComVisible is set to false on the registration functions but that's what I found in their examples. Does this look like all I should be doing? (NOTE: I did not previously have the ClassInterface, ProgID and ComVisible attributes set as part of the class declaration.)Thanks again.