VirtualBox

Ignore:
Timestamp:
Jun 28, 2016 7:57:46 PM (9 years ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp

    r60277 r61920  
    12291229            }
    12301230            break;
    1231         case WM_DESTROY:
    1232             return 0;
     1231         case WM_DESTROY:
     1232            {
     1233                PostQuitMessage(0);
     1234                return 0;
     1235            }
    12331236    }
    12341237    return DefWindowProc (hwnd, uMsg, wParam, lParam);
     
    12831286         */
    12841287        MSG msg;
    1285         while (GetMessage(&msg, NULL, 0, 0))
     1288        BOOL fRet;
     1289        while ((fRet = GetMessage(&msg, NULL, 0, 0)) > 0)
    12861290        {
    12871291            TranslateMessage(&msg);
    12881292            DispatchMessage(&msg);
    12891293        }
    1290 
    1291         /*
    1292          * Clean up.
    1293          */
    1294         DestroyWindow(g_VBoxUsbGlobal.hWnd);
     1294        Assert(fRet >= 0);
    12951295    }
    12961296
     
    15541554    BOOL bRc;
    15551555#ifdef VBOX_USB_USE_DEVICE_NOTIFICATION
    1556     bRc = PostMessage(g_VBoxUsbGlobal.hWnd, WM_QUIT, 0, 0);
     1556    bRc = PostMessage(g_VBoxUsbGlobal.hWnd, WM_CLOSE, 0, 0);
    15571557    AssertMsg(bRc, ("PostMessage for hWnd failed winEr(%d)\n", GetLastError()));
    15581558
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