VirtualBox

Changeset 40760 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
Apr 3, 2012 9:29:08 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77254
Message:

VBoxGINA: Set status to active when screensaver becomes active.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxGINA/VBoxGINA.cpp

    r40214 r40760  
    451451BOOL WINAPI WlxScreenSaverNotify(PVOID pWlxContext, BOOL *pSecure)
    452452{
    453     VBoxGINAVerbose(0, "VBoxGINA::WlxScreenSaverNotify\n");
    454 
    455     /* Forward to MSGINA if present. */
    456     if (GWlxScreenSaverNotify)
    457         return GWlxScreenSaverNotify(pWlxContext, pSecure);
    458     /* Return something intelligent */
     453    VBoxGINAVerbose(0, "VBoxGINA::WlxScreenSaverNotify, pSecure=%d\n",
     454                    pSecure ? *pSecure : 0);
     455
     456    /* Report / set back status to "active" since the screensaver
     457     * (Winlogon) does give VBoxGINA yet the chance to hook into dialogs
     458     * which only then in turn would set the status to "active" -- so
     459     * do this here explicitly. */
     460    VBoxGINAReportStatus(VBoxGuestFacilityStatus_Active);
     461
     462    /* Note: Disabling the screensaver's grace period is necessary to get
     463     *       VBoxGINA loaded and set the status to "terminated" again properly
     464     *       after the logging-in handling was done. To do this:
     465     *       - on a non-domain machine, set:
     466     *         HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ScreenSaverGracePeriod (REG_SZ)
     467     *         to "0"
     468     *       - on a machine joined a domain:
     469     *         use the group policy preferences and/or the registry key above,
     470     *         depending on the domain's policies.
     471     */
     472
     473    /* Indicate that the workstation should be locked. */
    459474    *pSecure = TRUE;
    460     return TRUE;
     475
     476    return TRUE; /* Screensaver should be activated. */
    461477}
    462478
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette