<?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 Handling System.Runtime.InteropServices.COMException in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/handling-system-runtime-interopservices/m-p/1227423#M20533</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am new to this ArcObjects SDK development&lt;/P&gt;&lt;P&gt;I am trying to get the feature class name from the shapefile.&lt;/P&gt;&lt;P&gt;But it throws,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;System.Runtime.InteropServices.COMException: 'Unspecified error&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The element '{&lt;A href="http://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes}Text" target="_blank" rel="noopener"&gt;http://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes}Text&lt;/A&gt;' is used but not declared in the DTD/Schema.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I can't find solution to resolve this.&lt;/P&gt;&lt;P&gt;I am attaching my code snippet and error message below.&lt;/P&gt;&lt;P&gt;It would be more helpful if anyone has solution for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using visual studio 2019 and ArcGIS 10.8&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShanmugapriyaL1_0-1667307361900.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/54957i245B5C7EEE5B63A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShanmugapriyaL1_0-1667307361900.png" alt="ShanmugapriyaL1_0-1667307361900.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Nov 2022 12:56:31 GMT</pubDate>
    <dc:creator>ShanmugapriyaL1</dc:creator>
    <dc:date>2022-11-01T12:56:31Z</dc:date>
    <item>
      <title>Handling System.Runtime.InteropServices.COMException</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/handling-system-runtime-interopservices/m-p/1227423#M20533</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am new to this ArcObjects SDK development&lt;/P&gt;&lt;P&gt;I am trying to get the feature class name from the shapefile.&lt;/P&gt;&lt;P&gt;But it throws,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;System.Runtime.InteropServices.COMException: 'Unspecified error&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The element '{&lt;A href="http://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes}Text" target="_blank" rel="noopener"&gt;http://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes}Text&lt;/A&gt;' is used but not declared in the DTD/Schema.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I can't find solution to resolve this.&lt;/P&gt;&lt;P&gt;I am attaching my code snippet and error message below.&lt;/P&gt;&lt;P&gt;It would be more helpful if anyone has solution for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using visual studio 2019 and ArcGIS 10.8&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShanmugapriyaL1_0-1667307361900.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/54957i245B5C7EEE5B63A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShanmugapriyaL1_0-1667307361900.png" alt="ShanmugapriyaL1_0-1667307361900.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 12:56:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/handling-system-runtime-interopservices/m-p/1227423#M20533</guid>
      <dc:creator>ShanmugapriyaL1</dc:creator>
      <dc:date>2022-11-01T12:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Handling System.Runtime.InteropServices.COMException</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/handling-system-runtime-interopservices/m-p/1227429#M20535</link>
      <description>&lt;P&gt;This is how I connect to a shapefile workspace:&lt;/P&gt;&lt;P&gt;public static IWorkspace OpenShapeFileWorkspace(string shapeFileDir)&lt;BR /&gt;{&lt;BR /&gt;IWorkspace ws;&lt;BR /&gt;IPropertySet pShpConn = new PropertySetClass();&lt;BR /&gt;pShpConn.SetProperty("DATABASE", shapeFileDir);&lt;BR /&gt;IWorkspaceFactory wsf = new ShapefileWorkspaceFactoryClass();&lt;BR /&gt;ws = wsf.Open(pShpConn, 0);&lt;BR /&gt;return ws;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 13:19:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/handling-system-runtime-interopservices/m-p/1227429#M20535</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2022-11-01T13:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Handling System.Runtime.InteropServices.COMException</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/handling-system-runtime-interopservices/m-p/1227794#M20536</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I tried your code, but it also throws the same exception.&lt;/P&gt;&lt;P&gt;Please help me out in this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShanmugapriyaL1_0-1667374114971.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/55052i92B3E651F271C3C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShanmugapriyaL1_0-1667374114971.png" alt="ShanmugapriyaL1_0-1667374114971.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 07:26:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/handling-system-runtime-interopservices/m-p/1227794#M20536</guid>
      <dc:creator>ShanmugapriyaL1</dc:creator>
      <dc:date>2022-11-02T07:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Handling System.Runtime.InteropServices.COMException</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/handling-system-runtime-interopservices/m-p/1234509#M20541</link>
      <description>&lt;P&gt;What is expected from&amp;nbsp;&lt;A href="https://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes" target="_blank"&gt;http://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;On the surface it looks like the shapefile is corrupted.&amp;nbsp; There may be something in it that is unsupported.&lt;/P&gt;&lt;P&gt;I would test opening other simpler shape files to test this.&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 14:55:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/handling-system-runtime-interopservices/m-p/1234509#M20541</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2022-11-23T14:55:16Z</dc:date>
    </item>
  </channel>
</rss>

