nofarah

ArcObject License intialization failed using ArcGIS editor 60 days trial

Discussion created by nofarah on May 8, 2011
Latest reply on May 9, 2011 by nofarah
Hi,

I downloaded and activated the ArcGIS Editor 10 trial (60 days) on my PC. I can start ArcCatalgo and ArcMap just fine.

Now I'm playing with ArcObjects and before creating any of the ArcObjects, I needed to initialize the license first as explained in the ArcObject doc.

My call to checkout license fail for all cases (ArcView, ArcEditor and ArcInfo). I tried them all even
I know i have ArcEditor but no luck.

::CoInitialize(NULL);

IAoInitializePtr ipInit(CLSID_AoInitialize);

esriLicenseStatus status = esriLicenseFailure;
// Is ArcView available ?
enum esriLicenseProductCode productCode = esriLicenseProductCodeArcView;
ipInit->IsProductCodeAvailable(productCode, &status);
if(status != esriLicenseAvailable)
{
  // Is ArcEditor available ?
  productCode = esriLicenseProductCodeArcEditor;
  ipInit->IsProductCodeAvailable(productCode, &status);
  if(status != esriLicenseAvailable)
  {
   // Is ArcInfo available ?
   productCode = esriLicenseProductCodeArcInfo;
   ipInit->IsProductCodeAvailable(productCode, &status);
  }

}

Is the license not available because this is a trial license or may be I'm doing some thing wrong ?

Thanks
Jeff

Outcomes