ArcObjects Library Reference (System)  

IAoInitialize.Initialize Method

This must be called before any other ArcObjects are created to initialize product Code. If called a second time during the life time of an executable with a new product code, it will return esriLicenseAlreadyInitialized.

[Visual Basic .NET]
Public Function Initialize ( _
    ByVal ProductCode As esriLicenseProductCode _
) As esriLicenseStatus
[C#]
public esriLicenseStatus Initialize (
    esriLicenseProductCode ProductCode
);
[C++]
HRESULT Initialize(
  esriLicenseProductCode ProductCode,
  esriLicenseStatus* licenseStatus
);
[C++]

Parameters

ProductCode [in]

  ProductCode is a parameter of type esriLicenseProductCode

licenseStatus [out, retval]

  licenseStatus is a parameter of type esriLicenseStatus

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Initializes the appliction with the specified product license. The product license determines the functionality the application will be able to access. Once the product license has been initialized it cannot be changed for the duration of the applications life, as it is not possible to re-initialize the applicaiton.

Before initializing the application use the IsProductCodeAvailable and IsExtensionCodeAvailable methods to ensure the appropriate license(s) is available to Initialize the application with. If all the licenses you require are available using Engine Single Use then we recommend you use it in preference to the Desktop Concurrent and Desktop Single Use licenses. This means you will not limit the Desktop Concurrent licenses available to any other users.

Remarks

The Initialize method will fail to check out the specified product license if:

Note that loading data into the MapControl or PageLayoutControl through the property pages will automatically initialize the application with a product license. To ensure that the application is initialized with the product license specified by the Initialize method load data into the MapControl and PageLayoutControl programmatically after license initialization.

See Also

IAoInitialize Interface

.NET Snippets

Check Out Extension License |

.NET Samples

Extending the replication synchronization process (Code Files: RegisterExtension) | Find the closest intersection from a point (Code Files: FindClosestIntersection) | Geodesy MapControl (Code Files: GeodesyMapControl) | Locate coordinates (Code Files: LocateCoordinates) | Publish an image service and set configurations (Code Files: ISConfig) |

.NET Related Topics

Accessing licensing and extensions for the geoprocessor | How to change label formats and marks on an axis using a line graph | How to create a 3D pie graph | How to create a box plot graph | How to create a function series graph | How to create a graph template | How to create a histogram graph | How to create a selection set using a scatter plot graph | How to create a vertical stack area graph | How to create graph series with different color types | How to create multiple vertical bar graphs | How to group data into separate lines on a line graph | How to sort data in the graph | Performing a spatial analysis operation using objects | Version |