Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Problem getting IComPropertyPage2 (EditorExtension) to register

$
0
0
This has been an on-going problem and decided to tackle it as I am recompiling the ArcGIS 10 code for Windows 7. I have a EditorExtension class that implements IComPropertyPage2 for the purpose of adding a tab to the EditorExtension which listens for whether the user wants to invoke the extension or not.

This is set up as an msi (for now) and when the tlb is added, the commands are registered and added properly. However, the EditorExtension is usually hit or miss and the workaround has sometimes been to go into Categories and click Category Importer. That usually works but now in Windows 7, I can't even do that. The object simply does not show up in ESRI Editor Extension.

The code is fairly old but wonder if something is fundamentally wrong or is there now a better way of doing this? How do I get it to consistently register the EditorExtension upon install?

[Guid("8ED2FF58-AAD3-48fe-9A76-182D53D964B6")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("CSUEditorExtension.EditorPropertyPage")]
public class EditorPropertyPage : ESRI.ArcGIS.Framework.IComPropertyPage2
{
public EditorPropertyPage()
{
}

#region Class Variables
private Boolean m_pageDirty;
private IComPropertyPageSite m_propPageSite;
private frmEditorExtension m_frmCSU;
private CSU.ArcGIS.AddPtrInterface.AddPtrInterface m_CSUExtension;
private const String m_sVersionEnabled = "Enabled";
private const String m_sVersionDisabled = "Disabled";
private const String m_CSUExtensionGUID = "{DEF7F6B1-B483-430D-970C-47C2E3398F5D}";
#endregion

#region COM Registration Function(s)
[ComRegisterFunction()]
[ComVisible(false)]
static void RegisterFunction(Type registerType)
{
// Required for ArcGIS Component Category Registrar support
ArcGISCategoryRegistration(registerType);

//
// TODO: Add any COM registration code here
//
}

[ComUnregisterFunction()]
[ComVisible(false)]
static void UnregisterFunction(Type registerType)
{
// Required for ArcGIS Component Category Registrar support
ArcGISCategoryUnregistration(registerType);

//
// TODO: Add any COM unregistration code here
//
}

#region ArcGIS Component Category Registrar generated code
/// <summary>
/// Required method for ArcGIS Component Category registration -
/// Do not modify the contents of this method with the code editor.
/// </summary>
private static void ArcGISCategoryRegistration(Type registerType)
{
string regKey = string.Format("HKEY_CLASSES_ROOT\\CLSID\\{{{0}}}", registerType.GUID);
EditorPropertyPages.Register(regKey);

}
/// <summary>
/// Required method for ArcGIS Component Category unregistration -
/// Do not modify the contents of this method with the code editor.
/// </summary>
private static void ArcGISCategoryUnregistration(Type registerType)
{
string regKey = string.Format("HKEY_CLASSES_ROOT\\CLSID\\{{{0}}}", registerType.GUID);
EditorPropertyPages.Unregister(regKey);
}

#endregion
#endregion

Viewing all articles
Browse latest Browse all 1374

Trending Articles