<?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: ArcGIS 10 VB6 compatibility - DocumentEvents in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485333#M13109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, I had this same problem with VB6 code in version 10 and resolved it by implementing all the events.&amp;nbsp; I figured this out because the code was branching to address 0 which is intentionally reserved by the operating system.&amp;nbsp; This was the hint I needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the crash you are experiencing related to branching to address 0?&amp;nbsp; If so then you have the same problem.&amp;nbsp; Make sure that you implement &amp;gt;all&amp;lt; the events as defined in version 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If not then what is the unmanaged call stack when it crashes?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Jan 2011 14:22:21 GMT</pubDate>
    <dc:creator>RichardWatson</dc:creator>
    <dc:date>2011-01-10T14:22:21Z</dc:date>
    <item>
      <title>ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485329#M13105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;even if a know VB6 is no more supported on ArcGIS 10 as a development tool, it has also been said that applications written in VB6 for earlier versions of ArcGIS (read 9.3.1) are expected to run on version 10 (&lt;/SPAN&gt;&lt;A href="http://events.esri.com/uc/QandA/index.cfm?fuseaction=answer&amp;amp;conferenceId=2F6DC1A1-1422-2418-883C3868A9004888&amp;amp;questionId=3183" rel="nofollow noopener noreferrer" target="_blank"&gt;http://events.esri.com/uc/QandA/index.cfm?fuseaction=answer&amp;amp;conferenceId=2F6DC1A1-1422-2418-883C3868A9004888&amp;amp;questionId=3183&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a VB6 ArcMap extension and for now we cannot afford migrating all that code to VB.NET. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I thing we're not alone in this kind of situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So we are now trying to make that extension work on ArcGIS 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We needed to hook some document events, so we put this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Private WithEvents m_DocEvt As DocumentEvents&amp;nbsp;&amp;nbsp;&amp;nbsp; 

Private Sub IExtension_Startup(ByRef initializationData As Variant)
&amp;nbsp; On Error GoTo ErrorHandler
&amp;nbsp; 
&amp;nbsp; Set objApplication = initializationData
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; Exit Sub
ErrorHandler:
&amp;nbsp; MsgBoxShow "IExtension_Startup: " &amp;amp; Err.Number &amp;amp; " " &amp;amp; Err.Source &amp;amp; " " &amp;amp; Err.Description, vbCritical
End Sub

Private Property Let IExtensionConfig_State(ByVal ExtensionState As esriSystem.esriExtensionState)
&amp;nbsp; On Error GoTo ErrorHandler
&amp;nbsp; 
&amp;nbsp; If ExtensionState &amp;lt;&amp;gt; m_extState Then
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Activate
&amp;nbsp;&amp;nbsp;&amp;nbsp; If ExtensionState = esriESEnabled Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If InitializeExtension Then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Our stuff&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set m_DocEvt = objApplication.Document&amp;nbsp;&amp;nbsp; 'Hook events (*) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExtensionState = esriESUnavailable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp; ElseIf ExtensionState = esriESDisabled Then 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set m_DocEvt = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StopExtension True&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Our stuff&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp; m_extState = ExtensionState
&amp;nbsp; End If
&amp;nbsp; 
&amp;nbsp; Exit Property
ErrorHandler:
&amp;nbsp; MsgBoxShow "IExtensionConfig_State LET: " &amp;amp; Err.Number &amp;amp; " " &amp;amp; Err.Source &amp;amp; " " &amp;amp; Err.Description, vbCritical
End Property
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcGIS 10, if we hook DocumentEvents in (*), when the first event is fired (NewDocument, OpenDocument, CloseDocument), even without writing any code in events procedure, ArcMap exits with AV ("ArcGIS Desktop has encountered a serious application error....")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is someone experiencing this same problem? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe ESRI forgot to update this class (DocumentEvents) that is specific for VB6? But what about VBA code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Federico Albesano&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:23:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485329#M13105</guid>
      <dc:creator>FedericoAlbesano</dc:creator>
      <dc:date>2021-12-11T21:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485330#M13106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try implementing all the events, i.e. write a function for every document event even if you do nothing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 14:57:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485330#M13106</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2010-12-21T14:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485331#M13107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It worked! Thanks for help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We implemented only some events of IDocumentEvents (as common in VB6) and, until 10, it worked fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wouldn't ever tryed your solution by myself. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 08:54:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485331#M13107</guid>
      <dc:creator>FedericoAlbesano</dc:creator>
      <dc:date>2010-12-22T08:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485332#M13108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It worked! Thanks for help.&lt;BR /&gt;We implemented only some events of IDocumentEvents (as common in VB6) and, until 10, it worked fine. &lt;BR /&gt;I wouldn't ever tryed your solution by myself. &lt;BR /&gt;Thanks again.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a similar problem. I tried also to implement all other events that were not used before ArcGIS 10. But the problem (arcgis crashes at exiting) remains! Have you or someone else really tried the suggestion? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 12:59:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485332#M13108</guid>
      <dc:creator>GangYang</dc:creator>
      <dc:date>2011-01-10T12:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485333#M13109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, I had this same problem with VB6 code in version 10 and resolved it by implementing all the events.&amp;nbsp; I figured this out because the code was branching to address 0 which is intentionally reserved by the operating system.&amp;nbsp; This was the hint I needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the crash you are experiencing related to branching to address 0?&amp;nbsp; If so then you have the same problem.&amp;nbsp; Make sure that you implement &amp;gt;all&amp;lt; the events as defined in version 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If not then what is the unmanaged call stack when it crashes?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 14:22:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485333#M13109</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2011-01-10T14:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485334#M13110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have a similar problem. I tried also to implement all other events that were not used before ArcGIS 10. But the problem (arcgis crashes at exiting) remains! Have you or someone else really tried the suggestion? &lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I tryed that suggestion (implementing all events in IDocumentEvents) and it worked perfectly for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please note that in my case ArcMap crashed only if I hooked DocumentEvents and on first event raised, not only on exit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 14:28:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485334#M13110</guid>
      <dc:creator>FedericoAlbesano</dc:creator>
      <dc:date>2011-01-10T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485335#M13111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We still have some older apps that are built with VB6 and I'm having some issues. After uninstalling 9.3 and installing 10.0, I can run my apps that use map, ToC, toolbar and license controls directly within VB6, but I get "out of memory" or "ClassFactory cannot supply requested class" when I try to run the stand-alone apps that were compiled from VB6. Any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 12:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485335#M13111</guid>
      <dc:creator>BrianKrebs</dc:creator>
      <dc:date>2011-03-16T12:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485336#M13112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Standalone applications which call ArcObjects have to do some additional intialization in version 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In version 10, ESRI started to support side by side deployments but then abandoned the effort.&amp;nbsp; What that resulted in was additional complexity with no benefit.&amp;nbsp; If you do not set the version to use then the class factory cannot create the correct object.&amp;nbsp; ESRI plays a game here which you can see if you dig through the registry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 16:58:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485336#M13112</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2011-03-16T16:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485337#M13113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We still have some older apps that are built with VB6 and I'm having some issues. After uninstalling 9.3 and installing 10.0, I can run my apps that use map, ToC, toolbar and license controls directly within VB6, but I get "out of memory" or "ClassFactory cannot supply requested class" when I try to run the stand-alone apps that were compiled from VB6. Any suggestions?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even if it's not well documented by ESRI for VB6 (there is no more SDK!), for running our VB6 standalone application on ArcGIS 10 runtime, we only added the following code before using any ArcObjects call or component:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim pVer As IArcGISVersion
&amp;nbsp; 
Set pVer = New VersionManager
pVer.LoadVersion esriArcGISEngine, "10.0"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/PRE&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This code require a reference to "ArcGisVersion 1.0 Type Library"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:23:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485337#M13113</guid>
      <dc:creator>FedericoAlbesano</dc:creator>
      <dc:date>2021-12-11T21:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485338#M13114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Even if it's not well documented by ESRI for VB6 (there is no more SDK!), for running our VB6 standalone application on ArcGIS 10 runtime, we only added the following code before using any ArcObjects call or component:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim pVer As IArcGISVersion
&amp;nbsp; 
Set pVer = New VersionManager
pVer.LoadVersion esriArcGISEngine, "10.0"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/PRE&gt;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;This code require a reference to "ArcGisVersion 1.0 Type Library"&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In 9.3, you had to add a License Control to your form and you could right-click and go to properties and check the types of Product licenses you wanted your app to work with(ArcGIS Engine, ArcGIS Engine Enterprise GeoDatabase, ArcView, ArcEditor and ArcInfo).&amp;nbsp; When your app ran, it would automatically pick the correct license.&amp;nbsp; Since I now would have to pass productCode to pVer.LoadVersion, can I call pVer.LoadVersion multiple times passing it different productCodes to get the same effect?&amp;nbsp; Or do I have to try and determine the correct productCode license through code to use or maybe have the user select what license they have in order to apply the correct one?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:23:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485338#M13114</guid>
      <dc:creator>BrianKrebs</dc:creator>
      <dc:date>2021-12-11T21:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 10 VB6 compatibility - DocumentEvents</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485339#M13115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In 9.3, you had to add a License Control to your form and you could right-click and go to properties and check the types of Product licenses you wanted your app to work with(ArcGIS Engine, ArcGIS Engine Enterprise GeoDatabase, ArcView, ArcEditor and ArcInfo).&amp;nbsp; When your app ran, it would automatically pick the correct license.&amp;nbsp; Since I now would have to pass productCode to pVer.LoadVersion, can I call pVer.LoadVersion multiple times passing it different productCodes to get the same effect?&amp;nbsp; Or do I have to try and determine the correct productCode license through code to use or maybe have the user select what license they have in order to apply the correct one?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcGIS 10 you have to bind to a product version and then initialize a product license with LicenseControl or AoInitialize. Once binded to a product version, the binding cannot be revoked or changed while the application is still running. With IArcGISVersion you can list available products (take a look at it in VB6 with Object Viewer). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In fact I think you can bind to Engine runtime and then initialize ArcView or ArcInfo as license level (but you always need Engine runtime installed).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you can take a look at class RuntimeManager in SDK for .NET (&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/RuntimeManager_Class/004600000022000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/RuntimeManager_Class/004600000022000000/&lt;/A&gt;&lt;SPAN&gt;) you can see the following example for method Bind (VB.NET):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;If Not ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine) Then
&amp;nbsp; If Not ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show("Unable to bind to ArcGIS runtime. Application will be shut down.")
&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Cancel = True 'Abort application start up
&amp;nbsp; End If
End If
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is also a method BindLicense that bind to a product and initialize e license in one single call. I think .NET class RuntimeManager is built on top of VersionManager.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In VB6 you need to use the (undocumented) last one and try to replicate what in .NET world is done with RuntimeManager.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:23:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcgis-10-vb6-compatibility-documentevents/m-p/485339#M13115</guid>
      <dc:creator>FedericoAlbesano</dc:creator>
      <dc:date>2021-12-11T21:23:49Z</dc:date>
    </item>
  </channel>
</rss>

