I have an old VS project that was using ArcGis for a map control. I now have 10.2 on my machine. code that I used previously to find & initialize the license no longer works. I know the enums changed I fixed that. But still returns an enumstatus of EsriLicenseNotLicensed. I did find that in 10.xx one should call
if (ESRI.RuntimeManager.ActiveRuntime == null) ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop);But that is for .NET what do I do for C++?In my code I call
esriLicenseStatus enumStatus = esriLicenseNotLicensed;IAoInitializePtr pLicense ( __uuidof (AoInitialize));esriLicenseProductCode eProdCode = esriLicenseProductCodeEngine; while( enumStatus != esriLicenseAvailable ) { pLicense->IsProductCodeAvailable ( eProdCode, &enumStatus ); if ( enumStatus != esriLicenseAvailable ) { if (eProdCode == esriLicenseProductCodeEngine) eProdCode = esriLicenseProductCodeEngineGeoDB; else if (eProdCode == esriLicenseProductCodeEngineGeoDB) eProdCode = esriLicenseProductCodeArcServer; else if (eProdCode == esriLicenseProductCodeArcServer) eProdCode = esriLicenseProductCodeBasic; else if (eProdCode == esriLicenseProductCodeBasic) eProdCode = esriLicenseProductCodeStandard; else if (eProdCode == esriLicenseProductCodeStandard) eProdCode = esriLicenseProductCodeAdvanced; else break; } }later I call
pLicense->Initialize ( eProdCode, &enumStatus );which also fails with an enumStatus of no license
أكثر...
if (ESRI.RuntimeManager.ActiveRuntime == null) ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop);But that is for .NET what do I do for C++?In my code I call
esriLicenseStatus enumStatus = esriLicenseNotLicensed;IAoInitializePtr pLicense ( __uuidof (AoInitialize));esriLicenseProductCode eProdCode = esriLicenseProductCodeEngine; while( enumStatus != esriLicenseAvailable ) { pLicense->IsProductCodeAvailable ( eProdCode, &enumStatus ); if ( enumStatus != esriLicenseAvailable ) { if (eProdCode == esriLicenseProductCodeEngine) eProdCode = esriLicenseProductCodeEngineGeoDB; else if (eProdCode == esriLicenseProductCodeEngineGeoDB) eProdCode = esriLicenseProductCodeArcServer; else if (eProdCode == esriLicenseProductCodeArcServer) eProdCode = esriLicenseProductCodeBasic; else if (eProdCode == esriLicenseProductCodeBasic) eProdCode = esriLicenseProductCodeStandard; else if (eProdCode == esriLicenseProductCodeStandard) eProdCode = esriLicenseProductCodeAdvanced; else break; } }later I call
pLicense->Initialize ( eProdCode, &enumStatus );which also fails with an enumStatus of no license
أكثر...