esriVersion |
RuntimeManager..::.BindLicense Method (ProductCode) |
RuntimeManager Class Example See Also Send Feedback |
Bind to a particular ArcGIS product and automatically initialize with the Standard
license level. Binding is a new requirement for all stand-alone ArcGIS Engine
applications beginning at 10.0.
Namespace:
ESRI.ArcGISAssembly: ESRI.ArcGIS.Version (in ESRI.ArcGIS.Version.dll) Version: 10.0.0.0 (10.0.0.0)
Syntax
C# |
---|
public static void BindLicense( ProductCode code ) |
Visual Basic (Declaration) |
---|
Public Shared Sub BindLicense ( _ code As ProductCode _ ) |
Visual C++ |
---|
public: static void BindLicense( ProductCode code ) |
Parameters
- code
- Type: ESRI.ArcGIS..::.ProductCode
The ArcGIS product code; e.g., ProductCode.Engine, ProductCode.Desktop.
Return Value
Remarks
This function will Bind to the ArcGIS Product and then automatically call
AoInitialze with a Standard license level. Note, if the ProductCode.EngineOrDesktop
is chosen then the application will first try to Bind to an Engine Runtime; if an
Engine Rutime is unavailable, it will try to bind to a Desktop Runtime. Once bound,
the application will try to initialize with Standard licenses in the following order
of priority: Engine Runtime, Basic, Standard then Advanced for the Desktop. Therefore
BindLicense(ProductCode) should not be used if you want to constrain an application
to access GeodatabaseUpdate or Standard functionality, instead use
BindLicense(ProductCode, LicenseLevel) or AoInitialize.
Examples
The code below shows how to bind to a particular ArcGIS installation.
CopyC#
//Bind to Engine Product and License in this order (Engine Runtime) RuntimeManager.BindLicense(ProductCode.Engine); //Bind to Desktop Product and License in this order (Basic, Standard, Advanced) RuntimeManager.BindLicense(ProductCode.Desktop); //Bind to Engine Product first and if not available to Desktop Product //License Engine Runtime for Engine Product or Basic, Standard, Advanced for Desktop Product RuntimeManager.BindLicense(ProductCode.EngineOrDesktop);
CopyVB.NET
'Bind to Engine Product and License in this order (Engine Runtime) RuntimeManager.BindLicense(ProductCode.Engine) 'Bind to Desktop Product and License in this order (Basic, Standard, Advanced) RuntimeManager.BindLicense(ProductCode.Desktop) 'Bind to Engine Product first and if not available to Desktop Product 'License Engine Runtime for Engine Product or Basic, Standard, Advanced for Desktop Product RuntimeManager.BindLicense(ProductCode.EngineOrDesktop)