Changeset 40768 in vbox
- Timestamp:
- Apr 5, 2012 10:12:23 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77264
- Location:
- trunk/src/VBox/Additions/WINNT
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi
r40749 r40768 719 719 !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxGINA.dll" "$g_strSystemDir\VBoxGINA.dll" "$INSTDIR" 720 720 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL" "VBoxGINA.dll" 721 ; Add Windows notification package callbacks for VBoxGINA 722 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\VBoxGINA" "DLLName" "VBoxGINA.dll" 723 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\VBoxGINA" "Impersonate" 0 724 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\VBoxGINA" "StopScreenSaver" "WnpScreenSaverStop" 721 725 ${EndIf} 722 726 -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh
r40270 r40768 692 692 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL" 693 693 ${EndIf} 694 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\VBoxGINA" 694 695 695 696 ; Delete VBoxTray -
trunk/src/VBox/Additions/WINNT/VBoxGINA/VBoxGINA.cpp
r40760 r40768 261 261 262 262 /* Forward call */ 263 return GWlxInitialize(lpWinsta, hWlx, pvReserved, pWinlogonFunctions, pWlxContext); 263 if (GWlxInitialize) 264 return GWlxInitialize(lpWinsta, hWlx, pvReserved, pWinlogonFunctions, pWlxContext); 265 return TRUE; 264 266 } 265 267 … … 283 285 VBoxGINACredentialsPollerCreate(); 284 286 /* Forward call to MSGINA. */ 285 GWlxDisplaySASNotice(pWlxContext); 287 if (GWlxDisplaySASNotice) 288 GWlxDisplaySASNotice(pWlxContext); 286 289 } 287 290 } … … 299 302 VBoxGINACredentialsPollerCreate(); 300 303 301 int iRet; 302 iRet = GWlxLoggedOutSAS(pWlxContext, dwSasType, pAuthenticationId, pLogonSid, 303 pdwOptions, phToken, pMprNotifyInfo, pProfile); 304 305 if (iRet == WLX_SAS_ACTION_LOGON) 306 { 307 // 308 // Copy pMprNotifyInfo and pLogonSid for later use 309 // 310 311 // pMprNotifyInfo->pszUserName 312 // pMprNotifyInfo->pszDomain 313 // pMprNotifyInfo->pszPassword 314 // pMprNotifyInfo->pszOldPassword 315 } 316 317 return iRet; 304 if (GWlxLoggedOutSAS) 305 { 306 int iRet; 307 iRet = GWlxLoggedOutSAS(pWlxContext, dwSasType, pAuthenticationId, pLogonSid, 308 pdwOptions, phToken, pMprNotifyInfo, pProfile); 309 310 if (iRet == WLX_SAS_ACTION_LOGON) 311 { 312 // 313 // Copy pMprNotifyInfo and pLogonSid for later use 314 // 315 316 // pMprNotifyInfo->pszUserName 317 // pMprNotifyInfo->pszDomain 318 // pMprNotifyInfo->pszPassword 319 // pMprNotifyInfo->pszOldPassword 320 } 321 322 return iRet; 323 } 324 325 return WLX_SAS_ACTION_NONE; 318 326 } 319 327 … … 334 342 335 343 /* Forward call to MSGINA. */ 336 return GWlxActivateUserShell(pWlxContext, pszDesktopName, pszMprLogonScript, pEnvironment); 344 if (GWlxActivateUserShell) 345 return GWlxActivateUserShell(pWlxContext, pszDesktopName, pszMprLogonScript, pEnvironment); 346 return TRUE; /* Activate the user shell. */ 337 347 } 338 348 … … 350 360 /* Forward call to MSGINA. */ 351 361 VBoxGINAVerbose(0, "VBoxGINA::WlxLoggedOnSAS: Forwarding call to MSGINA ...\n"); 352 return GWlxLoggedOnSAS(pWlxContext, dwSasType, pReserved); 362 if (GWlxLoggedOnSAS) 363 return GWlxLoggedOnSAS(pWlxContext, dwSasType, pReserved); 364 return WLX_SAS_ACTION_NONE; 353 365 } 354 366 … … 371 383 VBoxGINACredentialsPollerCreate(); 372 384 /* Forward call to MSGINA. */ 373 GWlxDisplayLockedNotice(pWlxContext); 385 if (GWlxDisplayLockedNotice) 386 GWlxDisplayLockedNotice(pWlxContext); 374 387 } 375 388 } … … 382 395 { 383 396 VBoxGINAVerbose(0, "VBoxGINA::WlxIsLockOk\n"); 397 384 398 /* Forward call to MSGINA. */ 385 return GWlxIsLockOk(pWlxContext); 399 if (GWlxIsLockOk) 400 return GWlxIsLockOk(pWlxContext); 401 return TRUE; /* Locking is OK. */ 386 402 } 387 403 … … 397 413 398 414 /* Forward call to MSGINA. */ 399 return GWlxWkstaLockedSAS(pWlxContext, dwSasType); 415 if (GWlxWkstaLockedSAS) 416 return GWlxWkstaLockedSAS(pWlxContext, dwSasType); 417 return WLX_SAS_ACTION_NONE; 400 418 } 401 419 … … 405 423 VBoxGINAVerbose(0, "VBoxGINA::WlxIsLogoffOk\n"); 406 424 407 return GWlxIsLogoffOk(pWlxContext); 425 if (GWlxIsLogoffOk) 426 return GWlxIsLogoffOk(pWlxContext); 427 return TRUE; /* Log off is OK. */ 408 428 } 409 429 … … 421 441 422 442 /* Forward call to MSGINA. */ 423 GWlxLogoff(pWlxContext); 443 if (GWlxLogoff) 444 GWlxLogoff(pWlxContext); 424 445 } 425 446 … … 442 463 443 464 /* Forward call to MSGINA. */ 444 GWlxShutdown(pWlxContext, ShutdownType); 465 if (GWlxShutdown) 466 GWlxShutdown(pWlxContext, ShutdownType); 445 467 } 446 468 … … 454 476 pSecure ? *pSecure : 0); 455 477 456 /* Report / set back status to "active" since the screensaver457 * (Winlogon) does give VBoxGINA yet the chance to hook into dialogs478 /* Report the status to "init" since the screensaver 479 * (Winlogon) does not give VBoxGINA yet the chance to hook into dialogs 458 480 * which only then in turn would set the status to "active" -- so 459 * do this here explicitly. */460 VBoxGINAReportStatus(VBoxGuestFacilityStatus_ Active);481 * at least set some status here. */ 482 VBoxGINAReportStatus(VBoxGuestFacilityStatus_Init); 461 483 462 484 /* Note: Disabling the screensaver's grace period is necessary to get … … 571 593 if (GWlxDisconnectNotify) 572 594 GWlxDisconnectNotify(pWlxContext); 595 } 596 597 598 /* 599 * Windows Notification Package callbacks 600 */ 601 void WnpScreenSaverStop(PWLX_NOTIFICATION_INFO pInfo) 602 { 603 VBoxGINAVerbose(0, "VBoxGINA::WnpScreenSaverStop\n"); 604 605 /* 606 * Because we set the status to "init" in WlxScreenSaverNotify when 607 * the screensaver becomes active we also have to take into account 608 * that in case the screensaver terminates (either within the grace 609 * period or because the lock screen appears) we have to set the 610 * status accordingly. 611 */ 612 VBoxGINAReportStatus(VBoxGuestFacilityStatus_Terminated); 573 613 } 574 614 -
trunk/src/VBox/Additions/WINNT/VBoxGINA/VBoxGINA.def
r40214 r40768 44 44 ; Debug 45 45 VBoxGINADebug 46 ; Windows Notification Package callbacks 47 WnpScreenSaverStop
Note:
See TracChangeset
for help on using the changeset viewer.