VirtualBox

儲存庫 vbox 的更動 63081


忽略:
時間撮記:
2016-8-6 下午01:58:35 (8 年 以前)
作者:
vboxsync
訊息:

NPGetResourceInformation: Local variable s/pNetResource/pNetResourceInfo/ as the name is easy to confusing with unrelated parameter lpNetResource.

位置:
trunk/src/VBox/Additions/WINNT/SharedFolders
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsf.c

    r63080 r63081  
    11/* $Id$ */
    22/** @file
    3  * VirtualBox Windows Guest Shared Folders.
    4  *
    5  * File System Driver initialization and generic routines
     3 * VirtualBox Windows Guest Shared Folders - File System Driver initialization and generic routines
    64 */
    75
  • trunk/src/VBox/Additions/WINNT/SharedFolders/np/vboxmrxnp.cpp

    r62679 r63081  
    11/* $Id$ */
    22/** @file
    3  *
    4  * VirtualBox Windows Guest Shared Folders
    5  *
    6  * Network provider dll
     3 * VirtualBox Windows Guest Shared Folders - Network provider dll
    74 */
    85
     
    2017
    2118#include <iprt/win/windows.h>
    22 #include <windef.h>
    23 #include <winbase.h>
    2419#include <winsvc.h>
    2520#include <winnetwk.h>
     
    12361231    DWORD cbEntry;
    12371232    WCHAR *pStrings = (WCHAR *)((PBYTE)lpBuffer + *lpBufferSize);
    1238     NETRESOURCE *pNetResource = (NETRESOURCE *)lpBuffer;
     1233    NETRESOURCE *pNetResourceInfo = (NETRESOURCE *)lpBuffer;
    12391234
    12401235    /* Check what kind of the resource is that by parsing path components.
     
    12561251        }
    12571252
    1258         memset(pNetResource, 0, sizeof (*pNetResource));
    1259 
    1260         pNetResource->dwType = RESOURCETYPE_ANY;
    1261         pNetResource->dwDisplayType = RESOURCEDISPLAYTYPE_SERVER;
    1262         pNetResource->dwUsage = RESOURCEUSAGE_CONTAINER;
     1253        memset(pNetResourceInfo, 0, sizeof (*pNetResourceInfo));
     1254
     1255        pNetResourceInfo->dwType = RESOURCETYPE_ANY;
     1256        pNetResourceInfo->dwDisplayType = RESOURCEDISPLAYTYPE_SERVER;
     1257        pNetResourceInfo->dwUsage = RESOURCEUSAGE_CONTAINER;
    12631258
    12641259        pStrings = (PWCHAR)((PBYTE)pStrings - (cbEntry - sizeof(NETRESOURCE)));
    12651260
    1266         pNetResource->lpRemoteName = pStrings;
     1261        pNetResourceInfo->lpRemoteName = pStrings;
    12671262        *pStrings++ = L'\\';
    12681263        *pStrings++ = L'\\';
     
    12701265        pStrings += sizeof(MRX_VBOX_SERVER_NAME_U) / sizeof(WCHAR);
    12711266
    1272         pNetResource->lpProvider = pStrings;
     1267        pNetResourceInfo->lpProvider = pStrings;
    12731268        CopyMemory (pStrings, MRX_VBOX_PROVIDER_NAME_U, sizeof(MRX_VBOX_PROVIDER_NAME_U));
    12741269        pStrings += sizeof(MRX_VBOX_PROVIDER_NAME_U) / sizeof(WCHAR);
    12751270
    12761271        Log(("VBOXNP: NPGetResourceInformation: lpRemoteName: %ls, strings %p/%p\n",
    1277              pNetResource->lpRemoteName, pStrings, (PBYTE)lpBuffer + *lpBufferSize));
     1272             pNetResourceInfo->lpRemoteName, pStrings, (PBYTE)lpBuffer + *lpBufferSize));
    12781273
    12791274        if (lplpSystem)
     
    13091304        }
    13101305
    1311         memset(pNetResource, 0, sizeof (*pNetResource));
    1312 
    1313         pNetResource->dwType = RESOURCETYPE_DISK;
    1314         pNetResource->dwDisplayType = RESOURCEDISPLAYTYPE_SHARE;
    1315         pNetResource->dwUsage = RESOURCEUSAGE_CONNECTABLE;
     1306        memset(pNetResourceInfo, 0, sizeof (*pNetResourceInfo));
     1307
     1308        pNetResourceInfo->dwType = RESOURCETYPE_DISK;
     1309        pNetResourceInfo->dwDisplayType = RESOURCEDISPLAYTYPE_SHARE;
     1310        pNetResourceInfo->dwUsage = RESOURCEUSAGE_CONNECTABLE;
    13161311
    13171312        pStrings = (PWCHAR)((PBYTE)pStrings - (cbEntry - sizeof(NETRESOURCE)));
    13181313
    1319         pNetResource->lpRemoteName = pStrings;
     1314        pNetResourceInfo->lpRemoteName = pStrings;
    13201315        *pStrings++ = L'\\';
    13211316        *pStrings++ = L'\\';
     
    13251320        pStrings += lp - lpAfterName + 1;
    13261321
    1327         pNetResource->lpProvider = pStrings;
     1322        pNetResourceInfo->lpProvider = pStrings;
    13281323        CopyMemory(pStrings, MRX_VBOX_PROVIDER_NAME_U, sizeof(MRX_VBOX_PROVIDER_NAME_U));
    13291324        pStrings += sizeof(MRX_VBOX_PROVIDER_NAME_U) / sizeof(WCHAR);
    13301325
    13311326        Log(("VBOXNP: NPGetResourceInformation: lpRemoteName: %ls, strings %p/%p\n",
    1332              pNetResource->lpRemoteName, pStrings, (PBYTE)lpBuffer + *lpBufferSize));
     1327             pNetResourceInfo->lpRemoteName, pStrings, (PBYTE)lpBuffer + *lpBufferSize));
    13331328
    13341329        if (lplpSystem)
     
    13541349    }
    13551350
    1356     memset(pNetResource, 0, sizeof (*pNetResource));
    1357 
    1358     pNetResource->dwType = RESOURCETYPE_DISK;
    1359     pNetResource->dwDisplayType = RESOURCEDISPLAYTYPE_SHARE;
    1360     pNetResource->dwUsage = RESOURCEUSAGE_CONNECTABLE;
     1351    memset(pNetResourceInfo, 0, sizeof (*pNetResourceInfo));
     1352
     1353    pNetResourceInfo->dwType = RESOURCETYPE_DISK;
     1354    pNetResourceInfo->dwDisplayType = RESOURCEDISPLAYTYPE_SHARE;
     1355    pNetResourceInfo->dwUsage = RESOURCEUSAGE_CONNECTABLE;
    13611356
    13621357    pStrings = (PWCHAR)((PBYTE)pStrings - (cbEntry - sizeof(NETRESOURCE)));
    13631358
    13641359    /* The server + share. */
    1365     pNetResource->lpRemoteName = pStrings;
     1360    pNetResourceInfo->lpRemoteName = pStrings;
    13661361    *pStrings++ = L'\\';
    13671362    *pStrings++ = L'\\';
     
    13721367    *pStrings++ = 0;
    13731368
    1374     pNetResource->lpProvider = pStrings;
     1369    pNetResourceInfo->lpProvider = pStrings;
    13751370    CopyMemory(pStrings, MRX_VBOX_PROVIDER_NAME_U, sizeof(MRX_VBOX_PROVIDER_NAME_U));
    13761371    pStrings += sizeof(MRX_VBOX_PROVIDER_NAME_U) / sizeof(WCHAR);
     
    13851380
    13861381    Log(("VBOXNP: NPGetResourceInformation: lpRemoteName: %ls, strings %p/%p\n",
    1387          pNetResource->lpRemoteName, pStrings, (PBYTE)lpBuffer + *lpBufferSize));
     1382         pNetResourceInfo->lpRemoteName, pStrings, (PBYTE)lpBuffer + *lpBufferSize));
    13881383    Log(("VBOXNP: NPGetResourceInformation: *lplpSystem: %ls\n", *lplpSystem));
    13891384
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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