儲存庫 vbox 的更動 63101
- 時間撮記:
- 2016-8-6 下午03:53:20 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp
r62679 r63101 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 19 /********************************************************************************************************************************* 20 * Header Files * 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_GUEST_DND 17 23 #include <iprt/win/windows.h> 18 24 #include "VBoxTray.h" … … 37 43 #include <iprt/cpp/mtlist.h> 38 44 39 #ifdef LOG_GROUP40 # undef LOG_GROUP41 #endif42 #define LOG_GROUP LOG_GROUP_GUEST_DND43 45 #include <VBox/log.h> 44 46 47 48 /********************************************************************************************************************************* 49 * Defined Constants And Macros * 50 *********************************************************************************************************************************/ 45 51 /* Enable this define to see the proxy window(s) when debugging 46 52 * their behavior. Don't have this enabled in release builds! */ … … 55 61 #define WM_VBOXTRAY_DND_MESSAGE WM_APP + 401 56 62 63 64 /********************************************************************************************************************************* 65 * Structures and Typedefs * 66 *********************************************************************************************************************************/ 57 67 /** Function pointer for SendInput(). This only is available starting 58 68 * at NT4 SP3+. */ … … 60 70 typedef BOOL (WINAPI* PFNENUMDISPLAYMONITORS)(HDC, LPCRECT, MONITORENUMPROC, LPARAM); 61 71 72 73 /********************************************************************************************************************************* 74 * Global Variables * 75 *********************************************************************************************************************************/ 62 76 /** Static pointer to SendInput() function. */ 63 static PFNSENDINPUT s_pfnSendInput = NULL; 64 static PFNENUMDISPLAYMONITORS s_pfnEnumDisplayMonitors = NULL; 65 77 static PFNSENDINPUT g_pfnSendInput = NULL; 78 static PFNENUMDISPLAYMONITORS g_pfnEnumDisplayMonitors = NULL; 79 80 static VBOXDNDCONTEXT g_Ctx = { 0 }; 81 82 83 /********************************************************************************************************************************* 84 * Internal Functions * 85 *********************************************************************************************************************************/ 66 86 static LRESULT CALLBACK vboxDnDWndProcInstance(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 67 87 static LRESULT CALLBACK vboxDnDWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 68 88 69 static VBOXDNDCONTEXT g_Ctx = { 0 }; 89 90 70 91 71 92 VBoxDnDWnd::VBoxDnDWnd(void) … … 340 361 */ 341 362 /* static */ 342 BOOL CALLBACK VBoxDnDWnd::MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, 343 LPRECT lprcMonitor, LPARAM lParam) 344 { 363 BOOL CALLBACK VBoxDnDWnd::MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM lParam) 364 { 365 RT_NOREF(hMonitor, hdcMonitor); 345 366 LPRECT pRect = (LPRECT)lParam; 346 367 AssertPtrReturn(pRect, FALSE); … … 1189 1210 1190 1211 /** @todo Multi-monitor setups? */ 1212 #if 0 /* unused */ 1191 1213 int iScreenX = GetSystemMetrics(SM_CXSCREEN) - 1; 1192 1214 int iScreenY = GetSystemMetrics(SM_CYSCREEN) - 1; 1193 1215 #endif 1216 1217 /** @todo What the family are these statics doing there?!? */ 1194 1218 static LONG px = p.x; 1195 1219 if (px <= 0) … … 1407 1431 if (hDC) 1408 1432 { 1409 fRc = s_pfnEnumDisplayMonitors1433 fRc = g_pfnEnumDisplayMonitors 1410 1434 /* EnumDisplayMonitors is not available on NT4. */ 1411 ? s_pfnEnumDisplayMonitors(hDC, NULL, VBoxDnDWnd::MonitorEnumProc, (LPARAM)&r):1435 ? g_pfnEnumDisplayMonitors(hDC, NULL, VBoxDnDWnd::MonitorEnumProc, (LPARAM)&r): 1412 1436 FALSE; 1413 1437 … … 1491 1515 1492 1516 int rc; 1493 if ( s_pfnSendInput(1 /* Number of inputs */,1517 if (g_pfnSendInput(1 /* Number of inputs */, 1494 1518 Input, sizeof(INPUT))) 1495 1519 { … … 1532 1556 Input[0].type = INPUT_MOUSE; 1533 1557 Input[0].mi.dwFlags = MOUSEEVENTF_LEFTUP; 1534 if (! s_pfnSendInput(1, Input, sizeof(INPUT)))1558 if (!g_pfnSendInput(1, Input, sizeof(INPUT))) 1535 1559 { 1536 1560 DWORD dwErr = GetLastError(); … … 1656 1680 if (RT_SUCCESS(rc)) 1657 1681 { 1658 s_pfnSendInput = (PFNSENDINPUT)1682 g_pfnSendInput = (PFNSENDINPUT) 1659 1683 RTLdrGetSystemSymbol("User32.dll", "SendInput"); 1660 fSupportedOS = !RT_BOOL( s_pfnSendInput == NULL);1661 s_pfnEnumDisplayMonitors = (PFNENUMDISPLAYMONITORS)1684 fSupportedOS = !RT_BOOL(g_pfnSendInput == NULL); 1685 g_pfnEnumDisplayMonitors = (PFNENUMDISPLAYMONITORS) 1662 1686 RTLdrGetSystemSymbol("User32.dll", "EnumDisplayMonitors"); 1663 1687 /* g_pfnEnumDisplayMonitors is optional. */ … … 1755 1779 DECLCALLBACK(int) VBoxDnDWorker(void *pInstance, bool volatile *pfShutdown) 1756 1780 { 1781 RT_NOREF(pfShutdown); /** @todo r=bird: Why isn't pfShutdown used by VBoxDnDWorker? */ 1782 #ifdef DEBUG_andy 1783 # error "Why isn't pfShutdown used by VBoxDnDWorker?" 1784 #endif 1757 1785 AssertPtr(pInstance); 1758 1786 LogFlowFunc(("pInstance=%p\n", pInstance));
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器