[vbox-dev] [PATCH] GetWindowLong pointer bug

The Great and Powerful Trixie trixie at mail.bg
Mon Oct 14 23:26:27 GMT 2013


Greetings, humans.
Here, you can find powerful patch for 'GetWindowLong()' call, which can 
occasionally save a day for 64-bit windows hosts.

-- 
The Great and Powerful Trixie
-------------- next part --------------
Index: src/VBox/Devices/Storage/DrvHostBase.cpp
===================================================================
--- src/VBox/Devices/Storage/DrvHostBase.cpp    (revision 49065)
+++ src/VBox/Devices/Storage/DrvHostBase.cpp    (The Great and Powerful Trixie)
@@ -1486,7 +1486,7 @@
     Log2(("DeviceChangeWindowProc: hwnd=%08x uMsg=%08x\n", hwnd, uMsg));
     if (uMsg == WM_DESTROY)
     {
-        PDRVHOSTBASE pThis = (PDRVHOSTBASE)GetWindowLong(hwnd, GWLP_USERDATA);
+        PDRVHOSTBASE pThis = (PDRVHOSTBASE)GetWindowLongPtr(hwnd, GWLP_USERDATA);
         if (pThis)
             ASMAtomicXchgSize(&pThis->hwndDeviceChange, NULL);
         PostQuitMessage(0);


More information about the vbox-dev mailing list