VirtualBox

儲存庫 vbox 的更動 40295


忽略:
時間撮記:
2012-2-29 下午01:35:36 (13 年 以前)
作者:
vboxsync
訊息:

VBOXSF: NPGetUniversalName fix.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/WINNT/SharedFolders/np/vboxmrxnp.cpp

    r40269 r40295  
    509509    if (dwStatus == WN_SUCCESS)
    510510    {
    511         Log(("VBOXNP: NPGetConnection: RemoteName: %ls\n",
    512              RemoteName));
    513 
    514511        ULONG cbRemoteName = (lstrlen(RemoteName) + 1) * sizeof (WCHAR); /* Including the trailing 0. */
     512
     513        Log(("VBOXNP: NPGetConnection: RemoteName: %ls, cb %d\n",
     514             RemoteName, cbRemoteName));
    515515
    516516        DWORD len = sizeof(WCHAR) + cbRemoteName; /* Including the leading '\'. */
     
    15381538        }
    15391539
    1540         /* Adjust for actual remote name length. */
     1540        /* Adjust for actual remote name length as a part of the universal name. */
    15411541        BufferRequired += RemoteNameLength;
    15421542
    1543         /* And for required place for remaining path. */
     1543        /* And for required place for remaining path as a part of the universal name. */
    15441544        BufferRequired += RemainingPathLength;
    15451545
     
    15621562        lpString--; /* Trailing NULL */
    15631563
    1564         lpDelimiter = lpString; /* Delimiter will be inserted later. For now keep the NULL terminated string. */
     1564        lpDelimiter = lpString; /* Delimiter between the remote name and the remaining path.
     1565                                 * May be 0 if the remaining path is empty.
     1566                                 */
    15651567
    15661568        CopyMemory( lpString, lpRemainingPath, RemainingPathLength);
    15671569        lpString += RemainingPathLength / sizeof (WCHAR);
    15681570
    1569         *lpDelimiter = 0;
     1571        *lpDelimiter = 0; /* Keep NULL terminated remote name. */
    15701572
    15711573        pRemoteNameInfo->lpConnectionName = lpString;
     
    15761578        CopyMemory( lpString, lpRemainingPath, RemainingPathLength);
    15771579
    1578         *lpDelimiter = L'\\';
     1580        /* If remaining path was not empty, restore the delimiter in the universal name. */
     1581        if (RemainingPathLength > sizeof(WCHAR))
     1582        {
     1583           *lpDelimiter = L'\\';
     1584        }
    15791585    }
    15801586
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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