|
阅读:853回复:0
Engine开发License不能Initialize的问题
<P>在进行一些特殊操作的时候,需要利用AoInitialize初始化License,如:
<P> Dim t As esriLicenseStatus<BR> Set ao = New AoInitialize<BR> t = ao.IsProductCodeAvailable(esriLicenseProductCodeEngineGeoDB)<BR> Debug.Print t<BR> If t = esriLicenseAvailable Then<BR> t = ao.Initialize(esriLicenseProductCodeEngineGeoDB)<BR> Debug.Print t<BR> End If<BR>在实际编程过程中,发现如果窗体中有MapControl,而且对其进行了图层设置,就不能正常初始化License,导致程序不能正常运行。但是如果<FONT color=#f70909>将MapControl清空</FONT>,则license就能正常初始化。当然,如果还不行,可以<FONT color=#ee1111>尝试关闭VB</FONT>,重新打开工程。这个技巧在很多时候非常有用!</P> |
|
|