muralimohana_c

Migration from 9.3 to 10.0 getting solver failure.

Discussion created by muralimohana_c on Dec 2, 2011
Latest reply on Dec 2, 2011 by mrice-esristaff
We migrated from ArcGIS 9.3. to 10.0 and we are using ODCostMatrix and RouteSolver API in our application using C++ (COM) API and seeing solver failure issue when we are requesting for either ODCostMatrix or RouterSolver. Code snippet and return value as follows.

     IGPMessagesPtr pGPMessages;
     if(hr == S_OK)
     {
       pGPMessages.CreateInstance(CLSID_GPMessages);
       if(m_bRNSolverCancel)
         hr = pSolver->Solve(m_pNAContext, pGPMessages, m_PtrTrackCancel, &isPartial);
       else
         hr = pSolver->Solve(m_pNAContext, pGPMessages, NULL, &isPartial);
     }

Here solver returns hr as -2147221230 (0x80040112).

we also added new code in before Checkout license as well. details as follows.

// New for ArcGIS 10.0
IArcGISVersionPtr ipVersion(CLSID_VersionManager);
VARIANT_BOOL succeeded = VARIANT_FALSE;
HRESULT hr = ipVersion->LoadVersion(esriArcGISEngine, L"10.0", &succeeded);

Let us know, if we are missing anything here.

Thanks in advance.

Regards,
Murali Choudari.

Outcomes