Changeset 36012 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Feb 17, 2011 1:00:36 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 70096
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGINA/VBoxGINA.cpp
r33540 r36012 323 323 int WINAPI WlxLoggedOnSAS(PVOID pWlxContext, DWORD dwSasType, PVOID pReserved) 324 324 { 325 HKEY hKey;326 DWORD dwValue = 1;327 DWORD dwSize = 0;328 DWORD dwType = 0;329 int iRet = WLX_SAS_ACTION_NONE;330 331 325 Log(("VBoxGINA::WlxLoggedOnSAS: SaSType = %ld\n", dwSasType)); 332 326 333 /* Winlogon registry path */ 334 static TCHAR szPath[] = TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"); 335 336 if (!RegOpenKey(HKEY_LOCAL_MACHINE, szPath, &hKey)) 337 { 338 dwSize = sizeof(DWORD); 339 RegQueryValueEx(hKey, TEXT("SAS_S"), 0, &dwType, (PBYTE)&dwValue, &dwSize); 340 RegCloseKey(hKey); 341 } 342 else 343 { 344 Log(("VBoxGINA::WlxLoggedOnSAS: Could not open registry key! Last error: %d\n", GetLastError())); 345 } 346 347 if (dwValue) 348 { 349 switch (dwSasType) 350 { 351 352 case WLX_SAS_TYPE_CTRL_ALT_DEL: /* User pressed CTRL-ALT-DEL. */ 353 354 /* Show the task list (or whatever the OS wants to do here). */ 355 iRet = WLX_SAS_ACTION_TASKLIST; 356 break; 357 358 default: 359 break; 360 } 361 } 362 else 363 { 364 /* Forward call to MSGINA. */ 365 Log(("VBoxGINA::WlxLoggedOnSAS: Forwarding call to MSGINA ...\n")); 366 return GWlxLoggedOnSAS(pWlxContext, dwSasType, pReserved); 367 } 368 369 return iRet; 327 /* 328 * We don't want to do anything special here since the OS should behave 329 * as VBoxGINA wouldn't have been installed. So pass all calls down 330 * to the original MSGINA. 331 */ 332 333 /* Forward call to MSGINA. */ 334 Log(("VBoxGINA::WlxLoggedOnSAS: Forwarding call to MSGINA ...\n")); 335 return GWlxLoggedOnSAS(pWlxContext, dwSasType, pReserved); 370 336 } 371 337
Note:
See TracChangeset
for help on using the changeset viewer.