Changeset 50064 in vbox for trunk/src/VBox/Additions/WINNT/VBoxCredProv
- Timestamp:
- Jan 13, 2014 6:40:38 PM (11 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxCredProv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvProvider.cpp
r46382 r50064 5 5 6 6 /* 7 * Copyright (C) 2012-201 3Oracle Corporation7 * Copyright (C) 2012-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 142 142 && dwSize == sizeof(DWORD)) 143 143 { 144 m_fHandleRemoteSessions = true;144 m_fHandleRemoteSessions = RT_BOOL(dwValue); 145 145 } 146 146 … … 286 286 } 287 287 288 case CPUS_CHANGE_PASSWORD: 289 case CPUS_CREDUI: 290 case CPUS_PLAP: 288 case CPUS_CHANGE_PASSWORD: /* Asks us to provide a way to change the password. */ 289 case CPUS_CREDUI: /* Displays an own UI. We don't need that. */ 290 case CPUS_PLAP: /* See Pre-Logon-Access Provider. Not needed (yet). */ 291 291 292 292 hr = E_NOTIMPL; -
trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredentialProvider.cpp
r46593 r50064 5 5 6 6 /* 7 * Copyright (C) 2012-201 3Oracle Corporation7 * Copyright (C) 2012-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 46 46 47 47 #ifdef VBOX_WITH_SENS 48 static bool g_fSENSEnabled = false; 48 49 static IEventSystem *g_pIEventSystem; /**< Pointer to IEventSystem interface. */ 49 50 … … 388 389 case DLL_THREAD_DETACH: 389 390 break; 391 392 default: 393 break; 390 394 } 391 395 … … 442 446 if (!g_cDllRefs) 443 447 { 444 VBoxCredentialProviderUnregisterSENS(); 448 if (g_fSENSEnabled) 449 VBoxCredentialProviderUnregisterSENS(); 445 450 446 451 CoUninitialize(); … … 477 482 478 483 #ifdef VBOX_WITH_SENS 479 if (SUCCEEDED(hr)) 484 g_fSENSEnabled = true; /* By default SENS support is enabled. */ 485 486 HKEY hKey; 487 /** @todo Add some registry wrapper function(s) as soon as we got more values to retrieve. */ 488 DWORD dwRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Oracle\\VirtualBox Guest Additions\\AutoLogon", 489 0L, KEY_QUERY_VALUE, &hKey); 490 if (dwRet == ERROR_SUCCESS) 491 { 492 DWORD dwValue; 493 DWORD dwType = REG_DWORD; 494 DWORD dwSize = sizeof(DWORD); 495 496 dwRet = RegQueryValueEx(hKey, L"HandleSENS", NULL, &dwType, (LPBYTE)&dwValue, &dwSize); 497 if ( dwRet == ERROR_SUCCESS 498 && dwType == REG_DWORD 499 && dwSize == sizeof(DWORD)) 500 { 501 g_fSENSEnabled = RT_BOOL(dwValue); 502 } 503 504 RegCloseKey(hKey); 505 } 506 507 VBoxCredProvVerbose(0, "VBoxCredentialProviderCreate: g_fSENSEnabled=%RTbool\n", 508 g_fSENSEnabled); 509 if ( SUCCEEDED(hr) 510 && g_fSENSEnabled) 480 511 { 481 512 HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED); 482 513 VBoxCredentialProviderRegisterSENS(); 483 514 } 515 #else 516 VBoxCredProvVerbose(0, "VBoxCredentialProviderCreate: SENS support is disabled\n"); 484 517 #endif 485 518 }
Note:
See TracChangeset
for help on using the changeset viewer.