<?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 Re: E_NOINTERFACE in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416934#M11206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am glad that you sorted this out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The way the documentation reads is that you should only have to run ESRIRegAsm.&amp;nbsp; That said, I suspect that ESRIRegAsm does not take care of the case where you are running across processes.&amp;nbsp; That is pure speculation on my part.&amp;nbsp; I think that your case is atypical.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Feb 2011 21:01:27 GMT</pubDate>
    <dc:creator>RichardWatson</dc:creator>
    <dc:date>2011-02-23T21:01:27Z</dc:date>
    <item>
      <title>E_NOINTERFACE</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416928#M11200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have several custom extensions written in VB.net.&amp;nbsp; I compiled them into a .dll and ran proxygen against the .tlb file to generate a bunch of java proxy classes to expose the extensions outside of the ArcMap application.&amp;nbsp; I created a Java application that starts up ArcMap, waits until the AppROT says it is running, then performs the initialization that is found in all the java examples.&amp;nbsp; Then the code uses the ExtensionManager to find the extension that I created (and registered using ESRIRegasm) and calls a method I have on the extension (isRunning(boolean[])).&amp;nbsp; On my development machine (using eclipse), the code runs fine..ArcMap comes up, I call my method on the extension and it executes as expected.&amp;nbsp; Now I'm trying to deploy this to a non-development machine and it's not working.&amp;nbsp; ArcMap comes up, the license initialization code in my Java application is successfull (now...earlier posts described problems there), I find my extension calling the ExtensionManager, but now when I call isRunning, I get an Automation Exception that there is no such interface supported.&amp;nbsp; Something about the environments must be forcing my issue but I've no clue what it might be.&amp;nbsp; Can my extensions dll be anywhere I want it?&amp;nbsp; I've seen something about "well known location" for java extensions but not for a VB dll.&amp;nbsp; I guess I'm assuming the when you run ESRIRegasm that this allows the code to be able to find what its looking for.&amp;nbsp; Also, I ran acrosss a lot of information of threading apartments in trying to search for answers but I'm hoping this isn't an issue (especially since it works on my dev machine).&amp;nbsp; Any help would be greatly appreciated...running out of time to get this working.&amp;nbsp; Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Feb 2011 00:11:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416928#M11200</guid>
      <dc:creator>KenSimoncic</dc:creator>
      <dc:date>2011-02-19T00:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOINTERFACE</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416929#M11201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ESRI is based on the COM machine which uses the registry to find components.&amp;nbsp; Since your extension is getting created you have much of this in place.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the custom interface that you are looking for exposed to COM and in the registry?&amp;nbsp; Look for the GUID under HKLM\Interfaces.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Feb 2011 09:43:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416929#M11201</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2011-02-19T09:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOINTERFACE</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416930#M11202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In the registry I found the entry for the class that contains the interface that I am trying to call under HKLM\Software\Classes.&amp;nbsp; Searching for the CLSID, I find an entry in HKLM\SOFTWARE\Classes\CLSID and I can expand that but I don't see any information on the interfaces that I can call on the class.&amp;nbsp; When I registered the extension, using ESRIRegasm, I ran it on the dll and the tlb file isn't even on the deployed machine.&amp;nbsp; Is this a problem?&amp;nbsp; How does COM figure out what interfaces are valid on the class?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 20:13:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416930#M11202</guid>
      <dc:creator>KenSimoncic</dc:creator>
      <dc:date>2011-02-22T20:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOINTERFACE</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416931#M11203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The interface that you exposed to COM should have a GUID or IID.&amp;nbsp; Look for it under HKLM\Interfaces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Compare what you see on your development machine to what you see on the production machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Most COM usage is based on DLLs which run inside the ArcMap process.&amp;nbsp; When you ask a COM component for an interface it simply calls QueryInterface which .NET implements for you.&amp;nbsp; The interfaces do not need to be registered for this to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your case, you are calling across processes.&amp;nbsp; You have a Java application calling, via COM, a component which is running inside the ArcMap application.&amp;nbsp; In this case the interfaces must be registered because COM has to know how to marshall the arguments across processes.&amp;nbsp; This is normally done in COM by registering the type library.&amp;nbsp; My guess is that on your development machine the interface will reference a type library which you can also find in the registry.&amp;nbsp; If this is true, and it is not present on the production box, then try running regasm on the assembly on the production machine.&amp;nbsp; Probably something like "regasm myassembly.dll /tlb /codebase".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 21:10:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416931#M11203</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2011-02-22T21:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOINTERFACE</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416932#M11204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, thanks so far...getting closer.&amp;nbsp; When I was initially working on the extensions, I registered them on my development machine by bringing up ArcMap and choosing Customize -&amp;gt; Customize Mode -&amp;gt; Add from File and then selecting the TLB file.&amp;nbsp; 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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;On my development machine, the GUID for the Class which defines the interface that I want to call is in HKLM\Software\Classes\Interface.&amp;nbsp; 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).&amp;nbsp; So I figure my registration functions are not correct.&amp;nbsp; If I'm reading the documentation right, it looks like there are 2 places in each class that I need information.&amp;nbsp; At the top of the class I have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;GuidAttribute("EBAF6DBE-7E4F-45F8-B56B-AD9024E5F46A"), _
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClassInterface(ClassInterfaceType.None), _
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProgId("AGISExtension.cAGISExtension"), _
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ComVisible(True)&amp;gt; _
Public Class cAGISExtension
&amp;nbsp;&amp;nbsp;&amp;nbsp; Implements IAGISExtension
&amp;nbsp;&amp;nbsp;&amp;nbsp; Implements ESRI.ArcGIS.esriSystem.IExtension
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And then:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
#Region "COM Registration Functions"
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Add the registration funcions that will be executed when ESRIRegAsm is
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' run on the generated dll.&amp;nbsp; This will register with the ArcMap 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' extensions category. 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ComRegisterFunction(), ComVisible(False)&amp;gt; _
&amp;nbsp;&amp;nbsp;&amp;nbsp; Shared Sub RegisterFunction(ByVal registerType As Type)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MxExtension.Register(regKey)
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ComUnregisterFunction(), ComVisible(False)&amp;gt; _
&amp;nbsp;&amp;nbsp;&amp;nbsp; Shared Sub UnregisterFunction(ByVal registerType As Type)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MxExtension.Unregister(regKey)
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

#End Region
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure why the ComVisible is set to false on the registration functions but that's what I found in their examples.&amp;nbsp; Does this look like all I should be doing?&amp;nbsp; (NOTE:&amp;nbsp; I did not previously have the ClassInterface, ProgID and ComVisible attributes set as part of the class declaration.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:51:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416932#M11204</guid>
      <dc:creator>KenSimoncic</dc:creator>
      <dc:date>2021-12-11T18:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOINTERFACE</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416933#M11205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, after taking a reading comprehension course....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought there was just some sort of typo in your message because I was under the impression that I was supposed to use ESRIResgasm.&amp;nbsp; I re-read and I believe you are saying that I need to run both ESRIRegasm and regasm in my case.&amp;nbsp; That is what I did and amazingly, it worked!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thankyou very much for getting me on the right track.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 16:29:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416933#M11205</guid>
      <dc:creator>KenSimoncic</dc:creator>
      <dc:date>2011-02-23T16:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: E_NOINTERFACE</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416934#M11206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am glad that you sorted this out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The way the documentation reads is that you should only have to run ESRIRegAsm.&amp;nbsp; That said, I suspect that ESRIRegAsm does not take care of the case where you are running across processes.&amp;nbsp; That is pure speculation on my part.&amp;nbsp; I think that your case is atypical.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 21:01:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/e-nointerface/m-p/416934#M11206</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2011-02-23T21:01:27Z</dc:date>
    </item>
  </channel>
</rss>

