Migration ArcGIS 9.2 to 10

407
2
Jump to solution
01-24-2012 04:16 AM
kameninestor
New Contributor II
Hi,

I have this problem :

Impossible d'effectuer un cast d'un objet COM de type 'ESRI.ArcGIS.ArcMapUI.MxDocumentClass'  en type d'interface 'ESRI.ArcGIS.Framework.IDocument'.  Cette opération a échoué, car l'appel QueryInterface sur le composant COM pour l'interface avec  l'IID '{3E927177-307A-11D2-94C9-080009EEBECB}' a échoué en raison de l'erreur suivante : Le serveur RPC n'est pas disponible. (Exception de HRESULT : 0x800706BA).


In VS 2010.

This is my code :

 Dim objMxDoc As MxDocument   ... objMxDoc = New MxDocument


Somebody can help me?

Thanks

--
Nesta
0 Kudos
1 Solution

Accepted Solutions
kameninestor
New Contributor II
Have you tried either

Dim objMxDoc As IMxDocument
objMxDoc = New MxDocument

or

Dim objMxDoc As New MxDocument


I tried, but the problem persists
Private myApps As ESRI.ArcGIS.Framework.IApplication


in the method that starts ArcMap
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)

... Dim objMxDoc As IMxDocument ... objMxDoc = New MxDocument

View solution in original post

0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor
Have you tried either

Dim objMxDoc As IMxDocument
objMxDoc = New MxDocument

or

Dim objMxDoc As New MxDocument
0 Kudos
kameninestor
New Contributor II
Have you tried either

Dim objMxDoc As IMxDocument
objMxDoc = New MxDocument

or

Dim objMxDoc As New MxDocument


I tried, but the problem persists
Private myApps As ESRI.ArcGIS.Framework.IApplication


in the method that starts ArcMap
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)

... Dim objMxDoc As IMxDocument ... objMxDoc = New MxDocument
0 Kudos