evans@endevea.com

Licensing failing on client computer

Discussion created by evans@endevea.com on Jun 21, 2012
Latest reply on Jun 30, 2012 by evans@endevea.com
Hi,

We are having a licensing issue. On my dev comuter, the code works fine. On the client's computer, it fails to obtain a license.

We both have the same software installed (ArcGis 10.0) and both are Windows 7 64-bit. We have tried both single user and floating licenses without luck.

We have run out of things to try.

Any help would be really appreciated.

Cheers,

Michael

Our simple test app is:


#include "stdafx.h"

#define ARCGIS_VERSION 10.0

#include <iostream>
#include <ArcSDK.h>


bool InitAttemptWithoutExtension(esriLicenseProductCode product)
{
  IAoInitializePtr ipInit(CLSID_AoInitialize);
  HRESULT hr =ipInit->InitializedProduct(&product);

  esriLicenseStatus status = esriLicenseFailure;
   hr = ipInit->Initialize(product, &status);
  return (status == esriLicenseCheckedOut);
}


int _tmain(int argc, _TCHAR* argv[])
{
printf("License test has started.\n");

// ::AoInitialize(NULL);
CoInitialize(NULL);
ESRI_SET_VERSION(esriArcGISEngine,ARCGIS_VERSION)

//ESRI_SET_VERSION(esriArcGISEngine,ARCGIS_VERSION);
IAoInitializePtr ipInit(CLSID_AoInitialize);

// ShutdownApp();

esriLicenseExtensionCode license = (esriLicenseExtensionCode)0;
if (license == 0)
{
// Try to init as engine, then engineGeoDB, then ArcView,
//    then ArcEditor, then ArcInfo
if (!InitAttemptWithoutExtension(esriLicenseProductCodeEngine))
  if (!InitAttemptWithoutExtension(esriLicenseProductCode::esriLicenseProductCodeEngineGeoDB))
   if (!InitAttemptWithoutExtension(esriLicenseProductCodeArcView))
   if (!InitAttemptWithoutExtension(esriLicenseProductCodeArcEditor))
    if (!InitAttemptWithoutExtension(esriLicenseProductCodeArcInfo))
    {
     printf("License test has failed.\n");
     while(1);
     return 0;
    }
}

printf("License test is successful.\n");

while(1);
return 0;
}

Outcomes