VirtualBox

儲存庫 vbox 的更動 63101


忽略:
時間撮記:
2016-8-6 下午03:53:20 (8 年 以前)
作者:
vboxsync
訊息:

GA/NT/VBoxTray: warnings

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp

    r62679 r63101  
    1515 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1616 */
     17
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
     22#define LOG_GROUP LOG_GROUP_GUEST_DND
    1723#include <iprt/win/windows.h>
    1824#include "VBoxTray.h"
     
    3743#include <iprt/cpp/mtlist.h>
    3844
    39 #ifdef LOG_GROUP
    40 # undef LOG_GROUP
    41 #endif
    42 #define LOG_GROUP LOG_GROUP_GUEST_DND
    4345#include <VBox/log.h>
    4446
     47
     48/*********************************************************************************************************************************
     49*   Defined Constants And Macros                                                                                                 *
     50*********************************************************************************************************************************/
    4551/* Enable this define to see the proxy window(s) when debugging
    4652 * their behavior. Don't have this enabled in release builds! */
     
    5561#define WM_VBOXTRAY_DND_MESSAGE       WM_APP + 401
    5662
     63
     64/*********************************************************************************************************************************
     65*   Structures and Typedefs                                                                                                      *
     66*********************************************************************************************************************************/
    5767/** Function pointer for SendInput(). This only is available starting
    5868 *  at NT4 SP3+. */
     
    6070typedef BOOL (WINAPI* PFNENUMDISPLAYMONITORS)(HDC, LPCRECT, MONITORENUMPROC, LPARAM);
    6171
     72
     73/*********************************************************************************************************************************
     74*   Global Variables                                                                                                             *
     75*********************************************************************************************************************************/
    6276/** Static pointer to SendInput() function. */
    63 static PFNSENDINPUT s_pfnSendInput = NULL;
    64 static PFNENUMDISPLAYMONITORS s_pfnEnumDisplayMonitors = NULL;
    65 
     77static PFNSENDINPUT             g_pfnSendInput = NULL;
     78static PFNENUMDISPLAYMONITORS   g_pfnEnumDisplayMonitors = NULL;
     79
     80static VBOXDNDCONTEXT           g_Ctx = { 0 };
     81
     82
     83/*********************************************************************************************************************************
     84*   Internal Functions                                                                                                           *
     85*********************************************************************************************************************************/
    6686static LRESULT CALLBACK vboxDnDWndProcInstance(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
    6787static LRESULT CALLBACK vboxDnDWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
    6888
    69 static VBOXDNDCONTEXT g_Ctx = { 0 };
     89
     90
    7091
    7192VBoxDnDWnd::VBoxDnDWnd(void)
     
    340361 */
    341362/* static */
    342 BOOL CALLBACK VBoxDnDWnd::MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor,
    343                                           LPRECT lprcMonitor, LPARAM lParam)
    344 {
     363BOOL CALLBACK VBoxDnDWnd::MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM lParam)
     364{
     365    RT_NOREF(hMonitor, hdcMonitor);
    345366    LPRECT pRect = (LPRECT)lParam;
    346367    AssertPtrReturn(pRect, FALSE);
     
    11891210
    11901211        /** @todo Multi-monitor setups? */
     1212#if 0 /* unused */
    11911213        int iScreenX = GetSystemMetrics(SM_CXSCREEN) - 1;
    11921214        int iScreenY = GetSystemMetrics(SM_CYSCREEN) - 1;
    1193 
     1215#endif
     1216
     1217        /** @todo What the family are these statics doing there?!?  */
    11941218        static LONG px = p.x;
    11951219        if (px <= 0)
     
    14071431    if (hDC)
    14081432    {
    1409         fRc = s_pfnEnumDisplayMonitors
     1433        fRc = g_pfnEnumDisplayMonitors
    14101434            /* EnumDisplayMonitors is not available on NT4. */
    1411             ? s_pfnEnumDisplayMonitors(hDC, NULL, VBoxDnDWnd::MonitorEnumProc, (LPARAM)&r):
     1435            ? g_pfnEnumDisplayMonitors(hDC, NULL, VBoxDnDWnd::MonitorEnumProc, (LPARAM)&r):
    14121436              FALSE;
    14131437
     
    14911515
    14921516    int rc;
    1493     if (s_pfnSendInput(1 /* Number of inputs */,
     1517    if (g_pfnSendInput(1 /* Number of inputs */,
    14941518                       Input, sizeof(INPUT)))
    14951519    {
     
    15321556    Input[0].type       = INPUT_MOUSE;
    15331557    Input[0].mi.dwFlags = MOUSEEVENTF_LEFTUP;
    1534     if (!s_pfnSendInput(1, Input, sizeof(INPUT)))
     1558    if (!g_pfnSendInput(1, Input, sizeof(INPUT)))
    15351559    {
    15361560        DWORD dwErr = GetLastError();
     
    16561680    if (RT_SUCCESS(rc))
    16571681    {
    1658         s_pfnSendInput = (PFNSENDINPUT)
     1682        g_pfnSendInput = (PFNSENDINPUT)
    16591683            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)
    16621686            RTLdrGetSystemSymbol("User32.dll", "EnumDisplayMonitors");
    16631687        /* g_pfnEnumDisplayMonitors is optional. */
     
    17551779DECLCALLBACK(int) VBoxDnDWorker(void *pInstance, bool volatile *pfShutdown)
    17561780{
     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
    17571785    AssertPtr(pInstance);
    17581786    LogFlowFunc(("pInstance=%p\n", pInstance));
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette