Retrieving the COM class factory for component with CLSID : error: 80040111

1059
8
05-02-2014 10:15 AM
srikanthpilli
New Contributor II
I am working on migrating 9.3 Arc GIS Engine application to 10.1 Arc GIS Engine application. Everything is working good but at one of the following line(Dim pCalc2 As ICalculator = New ESRI.ArcGIS.GeoDatabaseUI.Calculator()) - I am getting the following message :



Retrieving the COM class factory for component with CLSID {D676066E-38CA-429A-B846-DA7A8446C52D} failed due to the following error: 80040111.

Any suggestions would be helpful.


Thanks.
0 Kudos
8 Replies
NeilClemmons
Regular Contributor III
ICalculator is a Desktop interface.  It is not installed by the Engine product.  This is the case with any interface or class that is part of an ArcObjects library whose name ends with UI.
0 Kudos
srikanthpilli
New Contributor II
ICalculator is a Desktop interface.  It is not installed by the Engine product.  This is the case with any interface or class that is part of an ArcObjects library whose name ends with UI.


Thanks Neil for your suggestions.

But, still we used the same code for 9.3 but when we migrated to 10.1 - we are facing this error message.


Thanks
0 Kudos
NeilClemmons
Regular Contributor III
The reason for the error is clear - you're trying to use a Desktop-only interface in an Engine application.  If the only thing you have installed on the target machine is the Engine runtime then that interface is not there because Engine doesn't install it.
0 Kudos
srikanthpilli
New Contributor II
The reason for the error is clear - you're trying to use a Desktop-only interface in an Engine application.  If the only thing you have installed on the target machine is the Engine runtime then that interface is not there because Engine doesn't install it.


Hi Neil,

Thanks for sharing your wisdom.

On the box where I am running the Arc GIS Engine application - I have Arc GIS Desktop & Arc GIS Engine SDK & Runtime, vs 2010.

Below is the code url, from which I did used a part of it - and it is at this point (Set pCalc = New Calculator) - I am getting the error message.

http://resources.esri.com/help/9.3/arcgisengine/arcobjects/esriGeoDatabaseUI/ICalculator_Example.htm



Thanks
Srikanth
0 Kudos
NeilClemmons
Regular Contributor III
Is your Engine application binding to the Desktop product and checking out a Desktop license?
0 Kudos
srikanthpilli
New Contributor II
Is your Engine application binding to the Desktop product and checking out a Desktop license?


Yes Neil, the Engine application is binding to Desktop product and checking out for Desktop License.


This is how the code looks when the form gets loaded :


  Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop)

        Dim ESRI_SW_CLASS As String = UCase(Environ("ESRI_SOFTWARE_CLASS"))
        Dim ARCGIS_LICENSE As String = UCase(Environ("ARCGIS_LICENSE_FILE"))
        Dim ESRI_SEAT_PREF As String = UCase(Environ("ESRI_SEAT_PREFERENCE"))

        pnlZoomToBtn.BackColor = AxToolbarControlMap.BackColor

     
        'Create a new AoInitialize object
        m_pAoInitialize = New AoInitialize
        If IsNothing(m_pAoInitialize) Then
            MsgBox("Unable to initialize. This application cannot run!", MsgBoxStyle.MsgBoxSetForeground, "Error")
            Me.Close()
            Exit Sub
        End If

        Dim licenseStatus As esriLicenseStatus

        If (ESRI_SEAT_PREF = "FLOAT") Then

            If (ESRI_SW_CLASS = "VIEWER") Then

                licenseStatus = CheckOutLicenses(esriLicenseProductCode.esriLicenseProductCodeBasic)

                'Not licensed
                If (licenseStatus = esriLicenseStatus.esriLicenseNotLicensed) Then
0 Kudos
NeilClemmons
Regular Contributor III
You're binding call is set to Engine or Desktop.  Try changing that to Desktop only.  The way you have it now it could be binding to the Engine product, which doesn't include the interface you're trying to use.
0 Kudos
srikanthpilli
New Contributor II
You're binding call is set to Engine or Desktop.  Try changing that to Desktop only.  The way you have it now it could be binding to the Engine product, which doesn't include the interface you're trying to use.


Thanks a lot Neil.

I really appreciate for taking time from schedule and replying to my message.

It's really nice of you.

Your solution did resolved my issue.


Thanks
0 Kudos