::CoInitialize(NULL); { HRESULT hr; IArcGISVersionPtr ipVer(__uuidof(VersionManager)); VARIANT_BOOL succeeded; if (FAILED(hr = ipVer->LoadVersion(esriArcGISEngine, CComBSTR(L"10.0"), &succeeded))) return hr; IAoInitializePtr ipAoInitialize(CLSID_AoInitialize); esriLicenseStatus ls; ipAoInitialize->Initialize(esriLicenseProductCodeArcInfo, &ls); ipAoInitialize->CheckOutExtension(esriLicenseExtensionCodeNetwork, &ls); // Do something else...e.g., solve in Network Analyst ipAoInitialize->Shutdown(); ipAoInitialize = NULL; } // Uninitialize COM ::CoUninitialize();
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.