<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Get IExtensionManager in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/get-iextensionmanager/m-p/188662#M4911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to figure out how to get a refrence to IExtensionManager without using IApplication. This is an Engine application that I am developing, and IApplication isn't available (the typical sample has you casting from IApplication like so)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pExtMgr As IExtensionManager&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pExt As IExtension&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pExtMgr = Application&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to simply co-create the ExtensionManager like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IExtensionManager xMan = (IExtensionManager) new ESRI.ArcGIS.esriSystem.ExtensionManagerClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but it failed, "Unable to cast object of type 'System.__ComObject' to type 'ESRI.ArcGIS.esriSystem.ExtensionManagerClass'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how do you do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Apr 2010 21:23:44 GMT</pubDate>
    <dc:creator>RiverTaig1</dc:creator>
    <dc:date>2010-04-19T21:23:44Z</dc:date>
    <item>
      <title>Get IExtensionManager</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/get-iextensionmanager/m-p/188662#M4911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to figure out how to get a refrence to IExtensionManager without using IApplication. This is an Engine application that I am developing, and IApplication isn't available (the typical sample has you casting from IApplication like so)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pExtMgr As IExtensionManager&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pExt As IExtension&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pExtMgr = Application&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to simply co-create the ExtensionManager like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IExtensionManager xMan = (IExtensionManager) new ESRI.ArcGIS.esriSystem.ExtensionManagerClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but it failed, "Unable to cast object of type 'System.__ComObject' to type 'ESRI.ArcGIS.esriSystem.ExtensionManagerClass'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how do you do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 21:23:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/get-iextensionmanager/m-p/188662#M4911</guid>
      <dc:creator>RiverTaig1</dc:creator>
      <dc:date>2010-04-19T21:23:44Z</dc:date>
    </item>
    <item>
      <title>Get IExtensionManager</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/get-iextensionmanager/m-p/188663#M4912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can try with&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IExtensionManagerAdmin pExAdmin = new ExtensionMangerClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IExtesnionManager pExtManager = (IExtensionManagerAdmin)pExAdmin;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 13:24:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/get-iextensionmanager/m-p/188663#M4912</guid>
      <dc:creator>AntJ</dc:creator>
      <dc:date>2010-04-21T13:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get IExtensionManager</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/get-iextensionmanager/m-p/188664#M4913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ExtensionManagerClass is a singleton class see &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/interacting_with_singleton_objects/00010000043p000000/"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/interacting_with_singleton_objects/00010000043p000000/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have this error is because you yet have a instance ExtensionManagerClass&amp;nbsp; that could be RCW generic System.__ComObject (in your case is so) so you cannot cast 'System.__ComObject'&amp;nbsp; to ExtensionManagerClass and ExtensionManagerClass&amp;nbsp; is a singleton. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you can resolve with &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Type t = Type.GetTypeFromProgID("...");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;System.Object obj = Activator.CreateInstance(t);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jun 2010 18:54:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/get-iextensionmanager/m-p/188664#M4913</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2010-06-08T18:54:40Z</dc:date>
    </item>
  </channel>
</rss>

