VirtualBox

Changeset 4303 in vbox


Ignore:
Timestamp:
Aug 23, 2007 8:15:36 AM (17 years ago)
Author:
vboxsync
Message:

Session control

File:
1 edited

Legend:

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

    r4302 r4303  
    2828{
    2929    const VBOXSERVICEENV *pEnv;
     30
     31    BOOL  fRDPState;
    3032} VBOXRESTORECONTEXT;
    3133
     
    3840    dprintf(("VBoxRestoreInit\n"));
    3941
    40     gCtx.pEnv = pEnv;
     42    gCtx.pEnv      = pEnv;
     43    gCtx.fRDPState = FALSE;
    4144
    4245    VBoxRestoreCheckVRDP();
     
    7073    ret = ExtEscape(hdc, VBOXESC_ISVRDPACTIVE, 0, NULL, 0, NULL);
    7174    dprintf(("VBoxRestoreSession -> VRDP activate state = %d\n", ret));
     75    ReleaseDC(HWND_DESKTOP, hdc);
    7276
    73     ReleaseDC(HWND_DESKTOP, hdc);
     77    if (ret != gCtx.fRDPState)
     78    {
     79        if (!DeviceIoControl (gCtx.pEnv->gDriver, (ret) ? IOCTL_VBOXGUEST_ENABLE_VRDP_SESSION : IOCTL_VBOXGUEST_DISABLE_VRDP_SESSION, NULL, 0, NULL, 0, &cbReturned, NULL))
     80        {
     81            dprintf(("VBoxRestoreThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));
     82        }
     83        gCtx.fRDPState = ret;
     84    }
    7485}
    7586
Note: See TracChangeset for help on using the changeset viewer.

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