Changeset 58440 in vbox for trunk/src/VBox/Runtime/r3
- Timestamp:
- Oct 27, 2015 5:40:34 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/nt/pathint-nt.cpp
r57978 r58440 47 47 /** 48 48 * Handles the pass thru case for UTF-8 input. 49 * Win32 path uses "\\?\" prefix which is converted to "\??\" NT prefix. 49 50 * 50 51 * @returns IPRT status code. … … 57 58 PRTUTF16 pwszPath = NULL; 58 59 size_t cwcLen; 59 int rc = RTStrToUtf16Ex(pszPath + 1, RTSTR_MAX, &pwszPath, 0, &cwcLen);60 int rc = RTStrToUtf16Ex(pszPath, RTSTR_MAX, &pwszPath, 0, &cwcLen); 60 61 if (RT_SUCCESS(rc)) 61 62 { … … 63 64 { 64 65 pwszPath[0] = '\\'; 65 pwszPath[1] = '.'; 66 pwszPath[2] = '\\'; 66 pwszPath[1] = '?'; 67 pwszPath[2] = '?'; 68 pwszPath[3] = '\\'; 67 69 68 70 pNtName->Buffer = pwszPath; … … 82 84 /** 83 85 * Handles the pass thru case for UTF-16 input. 86 * Win32 path uses "\\?\" prefix which is converted to "\??\" NT prefix. 84 87 * 85 88 * @returns IPRT status code. … … 92 95 PCRTUTF16 pwszWinPath, size_t cwcWinPath) 93 96 { 94 /* Drop a character because: \\?\ -> \.\ */95 pwszWinPath++;96 cwcWinPath--;97 98 97 /* Check length and allocate memory for it. */ 99 98 int rc; … … 105 104 /* Intialize the path. */ 106 105 pwszNtPath[0] = '\\'; 107 pwszNtPath[1] = '.'; 108 pwszNtPath[2] = '\\'; 109 memcpy(pwszNtPath + 3, pwszWinPath + 3, (cwcWinPath - 3) * sizeof(RTUTF16)); 106 pwszNtPath[1] = '?'; 107 pwszNtPath[2] = '?'; 108 pwszNtPath[3] = '\\'; 109 memcpy(pwszNtPath + 4, pwszWinPath + 4, (cwcWinPath - 4) * sizeof(RTUTF16)); 110 110 pwszNtPath[cwcWinPath] = '\0'; 111 111
Note:
See TracChangeset
for help on using the changeset viewer.