Changeset 50076 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jan 14, 2014 8:49:41 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredentialProvider.cpp
r50064 r50076 42 42 * Global Variables * 43 43 *******************************************************************************/ 44 static LONG g_cDllRefs = 0; /**< Global DLL reference count. */45 static HINSTANCE g_hDllInst = NULL; /**< Global DLL hInstance. */44 static LONG g_cDllRefs = 0; /**< Global DLL reference count. */ 45 static HINSTANCE g_hDllInst = NULL; /**< Global DLL hInstance. */ 46 46 47 47 #ifdef VBOX_WITH_SENS 48 48 static bool g_fSENSEnabled = false; 49 static IEventSystem *g_pIEventSystem ;/**< Pointer to IEventSystem interface. */49 static IEventSystem *g_pIEventSystem = NULL; /**< Pointer to IEventSystem interface. */ 50 50 51 51 /** … … 182 182 LONG m_cRefs; 183 183 }; 184 static VBoxCredProvSensLogon *g_pISensLogon ;184 static VBoxCredProvSensLogon *g_pISensLogon = NULL; 185 185 186 186 … … 213 213 } 214 214 215 if (SUCCEEDED(hr)) 215 if ( SUCCEEDED(hr) 216 && g_pIEventSystem) 216 217 { 217 218 IEventSubscription *pIEventSubscription; … … 292 293 VBoxCredProvVerbose(0, "VBoxCredentialProviderRegisterSENS: Error registering SENS provider, hr=%Rhrc\n", hr); 293 294 if (g_pIEventSystem) 295 { 294 296 g_pIEventSystem->Release(); 295 } 296 297 g_pIEventSystem = NULL; 298 } 299 } 300 301 VBoxCredProvVerbose(0, "VBoxCredentialProviderRegisterSENS: Returning hr=%Rhrc\n", hr); 297 302 return hr; 298 303 } … … 304 309 { 305 310 if (g_pIEventSystem) 311 { 306 312 g_pIEventSystem->Release(); 313 g_pIEventSystem = NULL; 314 } 307 315 308 316 /* We need to reconnecto to the event system because we can be called 309 317 * in a different context COM can't handle. */ 310 HRESULT hr = CoCreateInstance(CLSID_CEventSystem, 0, CLSCTX_SERVER, IID_IEventSystem, (void**)&g_pIEventSystem); 311 if (SUCCEEDED(hr)) 318 HRESULT hr = CoCreateInstance(CLSID_CEventSystem, 0, 319 CLSCTX_SERVER, IID_IEventSystem, (void**)&g_pIEventSystem); 320 if ( SUCCEEDED(hr) 321 && g_pIEventSystem) 312 322 { 313 323 VBoxCredProvVerbose(0, "VBoxCredentialProviderUnregisterSENS\n"); … … 346 356 347 357 g_pIEventSystem->Release(); 358 g_pIEventSystem = NULL; 348 359 } 349 360 350 361 if (g_pISensLogon) 362 { 351 363 delete g_pISensLogon; 364 g_pISensLogon = NULL; 365 } 366 367 VBoxCredProvVerbose(0, "VBoxCredentialProviderUnregisterSENS: Returning hr=%Rhrc\n", hr); 352 368 } 353 369 #endif /* VBOX_WITH_SENS */
Note:
See TracChangeset
for help on using the changeset viewer.