Select to view content in your preferred language

Problem with AppROT

826
2
11-26-2009 01:45 AM
SaschaFricke
Emerging Contributor
Hi,

I???ve a problem with the AppROT class under ArcGIS 9.4. When I create a new instance of AppROT I get a error like this:
COMException: CLSID {FABC30FB-D273-11D2-9F36-00C04F6BC61A} can not call: 80010111 (-2147221231)

I use the AppROT-Object to connect to 9.4, but it doesn???t works. I didn???t use the AppROT inside an ArcMap-Extension. In my ArcMap-Extension I can create new instances of the AppROT but not outside off an ArcMap 9.4-Instance.

But I want use it outside of my ArcMap Instance to connect the instance. I didn???t need it inside because I known my ArcMap Instance.

All works fine with ArcGIS 9.2 and 9.3.

What???s the mind of AppROT when I can???t use it outside of an ArcMap-Instance?

Here is the code that throws the error:
Dim pAppROT As New ESRI.ArcGIS.Framework.AppROT

Best regards
Sascha Fricke
0 Kudos
2 Replies
RalfGottschalk
Esri Contributor
Hi Sascha,

I think you might be running into the same problem that Griek was.

Make sure that you make a call to ESRI.ArcGIS.VersionManager.LoadVersion method and setting the product code to "Desktop".

ESRI.ArcGIS.VersionManager.LoadVersion(ESRI.ArcGIS.ProductCode.Desktop, "9.4")


You have to do this before you make any calls to ArcObjects in a standalone application.

Hope this fixes your problem.
0 Kudos
SaschaFricke
Emerging Contributor
Hi gottralf,

thanks for reply. It works.

Best regards
Sascha Fricke
0 Kudos