VirtualBox

Ignore:
Timestamp:
Oct 6, 2016 12:03:52 PM (8 years ago)
Author:
vboxsync
Message:

VBoxFrontends: fix for bugref:8161: added shutdown events handling to VirtualBox UI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/win/svcmain.cpp

    r63549 r64160  
    155155BOOL ShutdownBlockReasonCreateAPI(HWND hWnd,LPCWSTR pwszReason)
    156156{
    157     BOOL result = FALSE;
     157    BOOL fResult = FALSE;
    158158    typedef BOOL(WINAPI *PFNSHUTDOWNBLOCKREASONCREATE)(HWND hWnd, LPCWSTR pwszReason);
    159159
     
    162162    _ASSERTE(pfn);
    163163    if (pfn)
    164         result = pfn(hWnd, pwszReason);
    165     return result;
     164        fResult = pfn(hWnd, pwszReason);
     165    return fResult;
    166166}
    167167
     
    172172BOOL ShutdownBlockReasonDestroyAPI(HWND hWnd)
    173173{
    174     BOOL result = FALSE;
     174    BOOL fResult = FALSE;
    175175    typedef BOOL(WINAPI *PFNSHUTDOWNBLOCKREASONDESTROY)(HWND hWnd);
    176176
     
    179179    _ASSERTE(pfn);
    180180    if (pfn)
    181         result = pfn(hWnd);
    182     return result;
     181        fResult = pfn(hWnd);
     182    return fResult;
    183183}
    184184
     
    198198            /* decrease a latency of MonitorShutdown loop */
    199199            ASMAtomicXchgU32(&dwTimeOut, 100);
    200             Log(("VBoxSVCWinMain: VBoxSvc has active connections. bActivity = %d. Loc count = %d\n",
     200            Log(("VBoxSVCWinMain: WM_QUERYENDSESSION: VBoxSvc has active connections. bActivity = %d. Loc count = %d\n",
    201201                _Module.bActivity, _Module.GetLockCount()));
    202202        }
    203         Log(("VBoxSVCWinMain: WM_QUERYENDSESSION msg: %d rc= %d\n", msg, rc));
    204     } break;
     203     } break;
    205204    case WM_ENDSESSION:
    206205    {
     
    211210            Log(("VBoxSVCWinMain: user canceled system shutdown.\n"));
    212211        }
    213         Log(("VBoxSVCWinMain: WM_ENDSESSION msg: %d. wParam: %d. lParam: %d\n", msg, wParam, lParam));
    214212    } break;
    215213    case WM_DESTROY:
    216214    {
    217         Log(("VBoxSVCWinMain: WM_DESTROY \n"));
    218215        ShutdownBlockReasonDestroyAPI(hwnd);
    219216        PostQuitMessage(0);
     
    222219    default:
    223220    {
    224         Log(("VBoxSVCWinMain: msg %p\n", msg));
    225221        rc = DefWindowProc(hwnd, msg, wParam, lParam);
    226222    }
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