<?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 Connect to Esri map service using c++ in stand alone desktop app in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/connect-to-esri-map-service-using-c-in-stand-alone/m-p/317638#M8288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can anyone tell me how to do this?&amp;nbsp; Here is my code.&amp;nbsp; The Open call returns E_INVALIDARG.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IAGSServerConnectionFactoryPtr AGSConnectionFactory;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSConnectionFactory.CreateInstance(CLSID_AGSServerConnectionFactory);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IPropertySetPtr connectionProps;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;connectionProps.CreateInstance(CLSID_PropertySet);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;VARIANT TestURL = _variant_t("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://server.arcgisonline.com/arcgis/services/" rel="nofollow" target="_blank"&gt;http://server.arcgisonline.com/arcgis/services/&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hr = connectionProps-&amp;gt;SetProperty(BSTR("connectiontype"), _variant_t(esriAGSConnectionTypeInternet)); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hr = connectionProps-&amp;gt;SetProperty(BSTR("url"), TestURL);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IAGSServerConnectionPtr AGSConnection;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSConnection.CreateInstance(CLSID_AGSServerConnection);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hr = AGSConnectionFactory-&amp;gt;Open(connectionProps, 0, &amp;amp;AGSConnection);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2012 21:45:09 GMT</pubDate>
    <dc:creator>SueJenkins</dc:creator>
    <dc:date>2012-06-26T21:45:09Z</dc:date>
    <item>
      <title>Connect to Esri map service using c++ in stand alone desktop app</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/connect-to-esri-map-service-using-c-in-stand-alone/m-p/317638#M8288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can anyone tell me how to do this?&amp;nbsp; Here is my code.&amp;nbsp; The Open call returns E_INVALIDARG.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IAGSServerConnectionFactoryPtr AGSConnectionFactory;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSConnectionFactory.CreateInstance(CLSID_AGSServerConnectionFactory);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IPropertySetPtr connectionProps;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;connectionProps.CreateInstance(CLSID_PropertySet);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;VARIANT TestURL = _variant_t("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://server.arcgisonline.com/arcgis/services/" rel="nofollow" target="_blank"&gt;http://server.arcgisonline.com/arcgis/services/&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hr = connectionProps-&amp;gt;SetProperty(BSTR("connectiontype"), _variant_t(esriAGSConnectionTypeInternet)); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hr = connectionProps-&amp;gt;SetProperty(BSTR("url"), TestURL);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IAGSServerConnectionPtr AGSConnection;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSConnection.CreateInstance(CLSID_AGSServerConnection);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hr = AGSConnectionFactory-&amp;gt;Open(connectionProps, 0, &amp;amp;AGSConnection);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 21:45:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/connect-to-esri-map-service-using-c-in-stand-alone/m-p/317638#M8288</guid>
      <dc:creator>SueJenkins</dc:creator>
      <dc:date>2012-06-26T21:45:09Z</dc:date>
    </item>
  </channel>
</rss>

