VirtualBox

Ignore:
Timestamp:
Jun 30, 2016 2:18:11 AM (8 years ago)
Author:
vboxsync
Message:

fix for ​​​​​​bugref:8441: improved windows procedure in VBoxDispIf

File:
1 edited

Legend:

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

    r61603 r61943  
    924924)
    925925{
     926    /* TODO: AM need to check that the thread retrieves these events */
    926927    switch(uMsg)
    927928    {
     
    942943            break;
    943944        }
    944         case WM_CLOSE:
    945             LogFunc(("got WM_CLOSE for hwnd(0x%x)", hwnd));
    946             return 0;
    947         case WM_DESTROY:
    948             LogFunc(("got WM_DESTROY for hwnd(0x%x)", hwnd));
    949             return 0;
    950945        case WM_NCHITTEST:
    951946            LogFunc(("got WM_NCHITTEST for hwnd(0x%x)\n", hwnd));
     
    10511046    HRESULT hr = S_FALSE;
    10521047
     1048    /* Create the thread message queue*/
    10531049    PeekMessage(&Msg,
    10541050            NULL /* HWND hWnd */,
     
    10561052            WM_USER /* UINT wMsgFilterMax */,
    10571053            PM_NOREMOVE);
     1054   
     1055    /*
     1056    * Send signal that message queue is ready.
     1057    * From this moment only the thread is ready to receive messages.
     1058    */
     1059    BOOL bRc = SetEvent(pMon->hEvent);
     1060    if (!bRc)
     1061    {
     1062        DWORD winErr = GetLastError();
     1063        WARN_FUNC(("SetEvent failed, winErr = (%d)", winErr));
     1064        HRESULT tmpHr = HRESULT_FROM_WIN32(winErr);
     1065        Assert(tmpHr != S_OK);
     1066    }
    10581067
    10591068    do
     
    10651074            );
    10661075
    1067         if(!bResult) /* WM_QUIT was posted */
    1068         {
    1069             hr = S_FALSE;
    1070             Log(("VBoxTray: GetMessage returned FALSE\n"));
    1071             VBoxRrRetryStop();
    1072             break;
    1073         }
    1074 
    1075         if(bResult == -1) /* error occurred */
     1076        if (bResult == -1) /* error occurred */
    10761077        {
    10771078            DWORD winEr = GetLastError();
     
    10871088        }
    10881089
     1090        if(!bResult) /* WM_QUIT was posted */
     1091        {
     1092            hr = S_FALSE;
     1093            Log(("VBoxTray: GetMessage returned FALSE\n"));
     1094            VBoxRrRetryStop();
     1095            break;
     1096        }
     1097       
    10891098        switch (Msg.message)
    10901099        {
     
    11081117static DWORD WINAPI vboxRrRunnerThread(void *pvUser)
    11091118{
    1110     PVBOXRR pMon = &g_VBoxRr;
    1111 
    1112     BOOL bRc = SetEvent(pMon->hEvent);
    1113     if (!bRc)
    1114     {
    1115         DWORD winErr = GetLastError();
    1116         WARN_FUNC(("SetEvent failed, winErr = (%d)", winErr));
    1117         HRESULT tmpHr = HRESULT_FROM_WIN32(winErr);
    1118         Assert(tmpHr != S_OK);
    1119     }
    1120 
    11211119    HRESULT hr = vboxRrWndInit();
    11221120    Assert(hr == S_OK);
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