AnsweredAssumed Answered

HRESULT: 0x8004011 ESIR.Framwork.AppROT

Question asked by ljacedo on Apr 25, 2017


I have an application that we modified from a sample called ArcMap 2 SLD. The application is in VB.NET and it runs as as independent windows outside ArcMap (It is an exe)

On this application the author uses AppROT to get the running ArcMap and obtain the map display. Which it works perfectly. However when I run my modification of his tool, I get an error right on: m_ObjAppROT = New AppROT

The error I get is: 

Could not retrieve COM class generator for component with CLSID {FABC30FB-D273-11D2-9F36-00C04F6BC61A} Due to the following error: 80040111 ClassFactory can not supply the requested class

The CLSID is for esriFramework AppROT Key.

The code


Imports ESRI.ArcGIS.Framework

Imports ESRI.ArcGIS.Framework.AppROTClass

Imports System.Runtime.InteropServices

Imports ESRI.ArcGIS.SystemUI

Imports ESRI.ArcGIS.ArcMapUI

Imports ESRI.ArcGIS.Carto

Imports ESRI.ArcGIS.Carto.FeatureLayerClass

Imports ESRI.ArcGIS.Display

Imports stdole

Imports ESRI.ArcGIS.Geodatabase

Imports ESRI.ArcGIS.esriSystem

Imports System.IO


Public Class Analize_ArcMap_Symbols

#Region "Membervariablen"

    Private m_ObjDoc As IMxDocument     

    Private m_ObjApp As IApplication

    Private m_ObjAppROT As IAppROT

    Private m_ObjObjectCreator As IObjectFactory

    Private m_ObjMap As IMap

    Private frmMotherform As Motherform

    Friend m_StrProject As StructProject

    Private m_al1, m_al2, m_al3 As ArrayList

    Private m_alClassifiedFields As ArrayList

    Private m_cFilename As String

#End Region

Private Function GetApplication() As Boolean

        Dim Zahl As Long

        m_ObjApp = Nothing 


            m_ObjAppROT = New AppROT

            Zahl = m_ObjAppROT.Count 

             If TypeOf m_ObjAppROT.Item(0) Is IMxApplication Then

m_ObjApp = m_ObjAppROT.Item(0)

m_ObjDoc = m_ObjApp.Document()

m_ObjObjectCreator = m_ObjApp

Return True


                            Return False

            End If 

        Catch ex As Exception

            Return False

        End Try

    End Function

End Class