arcengine 获得lic 信息
2010-12-21 23:02
120 查看
private void button1_Click(object sender, EventArgs e)
{
ESRI.ArcGIS.esriSystem.IAoInitialize aoInitialize = new ESRI.ArcGIS.esriSystem.AoInitializeClass();
ESRI.ArcGIS.esriSystem.ILicenseInformation licenseInformation = (ESRI.ArcGIS.esriSystem.ILicenseInformation)aoInitialize;
System.String string_Licenses = null;
try
{
ESRI.ArcGIS.esriSystem.esriLicenseProductCode licenseProductCode = aoInitialize.InitializedProduct();
System.String string_LicenseProductName = licenseInformation.GetLicenseProductName(licenseProductCode);
string_Licenses = "This application is initialized with the following product license:" + System.Environment.NewLine + string_LicenseProductName + System.Environment.NewLine + "This application has the following extension licenses checked out:";
ESRI.ArcGIS.esriSystem.ILicenseInfoEnum licenseInfoEnum = licenseInformation.GetProductExtensions(licenseProductCode);
licenseInfoEnum.Reset();
ESRI.ArcGIS.esriSystem.esriLicenseExtensionCode licenseExtensionCode = licenseInfoEnum.Next();
while (!(System.Convert.ToInt32(licenseExtensionCode) == -1))
{
if (aoInitialize.IsExtensionCheckedOut(licenseExtensionCode) == true)
{
System.String string_LicenseExtensionName = licenseInformation.GetLicenseExtensionName(licenseExtensionCode);
string_Licenses = string_Licenses + System.Environment.NewLine + string_LicenseExtensionName;
}
licenseExtensionCode = licenseInfoEnum.Next();
}
System.Windows.Forms.MessageBox.Show(string_Licenses);
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.ToString());
}
}
{
ESRI.ArcGIS.esriSystem.IAoInitialize aoInitialize = new ESRI.ArcGIS.esriSystem.AoInitializeClass();
ESRI.ArcGIS.esriSystem.ILicenseInformation licenseInformation = (ESRI.ArcGIS.esriSystem.ILicenseInformation)aoInitialize;
System.String string_Licenses = null;
try
{
ESRI.ArcGIS.esriSystem.esriLicenseProductCode licenseProductCode = aoInitialize.InitializedProduct();
System.String string_LicenseProductName = licenseInformation.GetLicenseProductName(licenseProductCode);
string_Licenses = "This application is initialized with the following product license:" + System.Environment.NewLine + string_LicenseProductName + System.Environment.NewLine + "This application has the following extension licenses checked out:";
ESRI.ArcGIS.esriSystem.ILicenseInfoEnum licenseInfoEnum = licenseInformation.GetProductExtensions(licenseProductCode);
licenseInfoEnum.Reset();
ESRI.ArcGIS.esriSystem.esriLicenseExtensionCode licenseExtensionCode = licenseInfoEnum.Next();
while (!(System.Convert.ToInt32(licenseExtensionCode) == -1))
{
if (aoInitialize.IsExtensionCheckedOut(licenseExtensionCode) == true)
{
System.String string_LicenseExtensionName = licenseInformation.GetLicenseExtensionName(licenseExtensionCode);
string_Licenses = string_Licenses + System.Environment.NewLine + string_LicenseExtensionName;
}
licenseExtensionCode = licenseInfoEnum.Next();
}
System.Windows.Forms.MessageBox.Show(string_Licenses);
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.ToString());
}
}
相关文章推荐
- arcengine 获得lic 信息 C#源码
- 通过ArcEngine获得注记的信息
- 利用SqlConnection获得SqlServer的统计信息
- 获得磁盘的C++描述信息
- 获得双卡simCard信息
- PHP经验——获得PHP版本信息及版本比较
- java中利用反射获得对象的各种信息
- C# 获得设备usb信息
- ASP.NET中获得页面、服务器端信息的有用Request.ServerVariables
- 过滤eWebeditor等富文本中html标签,获得纯文本信息
- 音乐播放器-使用jaudiotagger获得音频元信息
- C#使用钩子获得按键信息的方法
- C语言怎么获得进程的PE文件信息
- android getprop指令获得系统信息
- 获得Linux系统中的IP、MAC地址,广播地址,子网掩码等信息详解
- Oracle自动还原数据管理参数以及获得还原数据信息
- PHP pathinfo()获得文件的路径、名称等信息说明
- .NET Interop: 从IErrorInfo错误对象获得托管代码的异常信息
- python获得http头信息
- 获得当前app的版本信息