Changeset 7418 in vbox
- Timestamp:
- Mar 10, 2008 4:01:58 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28852
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/dir.h
r5999 r7418 177 177 /** The length of the short field (number of RTUCS2 chars). 178 178 * It is 16-bit for reasons of alignment. */ 179 uint16_t c ucShortName;179 uint16_t cwcShortName; 180 180 /** The short name for 8.3 compatability. 181 181 * Empty string if not available. 182 182 * Since the length is a bit tricky for a UTF-8 encoded name, and since this 183 183 * is practically speaking only a windows thing, it is encoded as UCS-2. */ 184 RTU CS2 uszShortName[14];184 RTUTF16 wszShortName[14]; 185 185 /** The length of the filename. */ 186 186 uint16_t cbName; -
trunk/include/iprt/string.h
r7183 r7418 252 252 RTDECL(int) RTStrToUtf16Ex(const char *pszString, size_t cchString, PRTUTF16 *ppwsz, size_t cwc, size_t *pcwc); 253 253 254 /**255 * Allocates tmp buffer, translates pszString from UTF8 to UCS-2.256 *257 * @returns iprt status code.258 * @param ppwszString Receives pointer of allocated UCS-2 string.259 * The returned pointer must be freed using RTStrUcs2Free().260 * @param pszString UTF-8 string to convert.261 * @deprecated Use RTStrToUtf16().262 */263 DECLINLINE(int) RTStrUtf8ToUcs2(PRTUCS2 *ppwszString, const char *pszString)264 {265 return RTStrToUtf16(pszString, ppwszString);266 }267 268 /**269 * Translates pszString from UTF8 to backwater UCS-2, can allocate a temp buffer.270 *271 * @returns iprt status code.272 * @param ppwszString Receives pointer of allocated UCS-2 string.273 * The returned pointer must be freed using RTStrUcs2Free().274 * @param cwc Length of target buffer in RTUCS2s including the trailing '\\0'.275 * If 0 a temporary buffer is allocated.276 * @param pszString UTF-8 string to convert.277 * @deprecated Use RTStrToUtf16Ex().278 */279 DECLINLINE(int) RTStrUtf8ToUcs2Ex(PRTUCS2 *ppwszString, unsigned cwc, const char *pszString)280 {281 return RTStrToUtf16Ex(pszString, RTSTR_MAX, ppwszString, cwc, NULL);282 }283 284 254 285 255 /** … … 1293 1263 * @returns 0 if the first string identical to the second string. 1294 1264 * @returns > 0 if the first string greater than the second string. 1295 * @param pwsz1 First UTF-16 string. 1296 * @param pwsz2 Second UTF-16 string. 1265 * @param pwsz1 First UTF-16 string. Null is allowed. 1266 * @param pwsz2 Second UTF-16 string. Null is allowed. 1297 1267 * @remark This function will not make any attempt to validate the encoding. 1298 1268 */ … … 1309 1279 * @returns 0 if the first string identical to the second string. 1310 1280 * @returns > 0 if the first string greater than the second string. 1311 * @param pwsz1 First UTF-16 string. 1312 * @param pwsz2 Second UTF-16 string. 1281 * @param pwsz1 First UTF-16 string. Null is allowed. 1282 * @param pwsz2 Second UTF-16 string. Null is allowed. 1313 1283 */ 1314 1284 RTDECL(int) RTUtf16ICmp(PCRTUTF16 pwsz1, PCRTUTF16 pwsz2); … … 1325 1295 * @returns 0 if the first string identical to the second string. 1326 1296 * @returns > 0 if the first string greater than the second string. 1327 * @param pwsz1 First UTF-16 string. 1328 * @param pwsz2 Second UTF-16 string. 1297 * @param pwsz1 First UTF-16 string. Null is allowed. 1298 * @param pwsz2 Second UTF-16 string. Null is allowed. 1329 1299 */ 1330 1300 RTDECL(int) RTUtf16LocaleICmp(PCRTUTF16 pwsz1, PCRTUTF16 pwsz2); … … 1417 1387 1418 1388 /** 1419 * Allocates tmp buffer, translates pwszString from UCS-2 to UTF8.1420 *1421 * @returns iprt status code.1422 * @param ppszString Receives pointer of allocated UTF8 string.1423 * The returned pointer must be freed using RTStrFree().1424 * @param pwszString UCS-2 string to convert.1425 * @deprecated Use RTUtf16ToUtf8().1426 */1427 DECLINLINE(int) RTStrUcs2ToUtf8(char **ppszString, PCRTUCS2 pwszString)1428 {1429 return RTUtf16ToUtf8(pwszString, ppszString);1430 }1431 1432 /**1433 * Translates UCS-2 to UTF-8 using buffer provided by the caller or1434 * a fittingly sized buffer allocated by the function.1435 *1436 * @returns iprt status code.1437 * @param ppszString If cch is not zero, this points to the pointer to the1438 * buffer where the converted string shall be resulted.1439 * If cch is zero, this is where the pointer to the allocated1440 * buffer with the converted string is stored. The allocated1441 * buffer must be freed by using RTStrFree().1442 * @param cch Size of the passed in buffer (*ppszString).1443 * If 0 a fittingly sized buffer is allocated.1444 * @param pwszString UCS-2 string to convert.1445 * @deprecated1446 */1447 DECLINLINE(int) RTStrUcs2ToUtf8Ex(char **ppszString, size_t cch, PCRTUCS2 pwszString)1448 {1449 return RTUtf16ToUtf8Ex(pwszString, RTSTR_MAX, ppszString, cch, NULL);1450 }1451 1452 /**1453 * Free a UCS-2 string allocated by RTStrUtf8ToUcs2().1454 *1455 * @returns iprt status code.1456 * @param pwszString Pointer to buffer with unicode string to free.1457 * NULL is accepted.1458 * @deprecated1459 */1460 DECLINLINE(void) RTStrUcs2Free(PRTUCS2 pwszString)1461 {1462 RTUtf16Free(pwszString);1463 }1464 1465 /**1466 * Allocates a new copy of the given UCS-2 string.1467 *1468 * @returns Pointer to the allocated string copy. Use RTStrUcs2Free() to free it.1469 * @returns NULL when out of memory.1470 * @param pwszString UCS-2 string to duplicate.1471 * @deprecated1472 */1473 DECLINLINE(PRTUCS2) RTStrUcs2Dup(PCRTUCS2 pwszString)1474 {1475 return RTUtf16Dup(pwszString);1476 }1477 1478 /**1479 * Allocates a new copy of the given UCS-2 string.1480 *1481 * @returns iprt status code.1482 * @param ppwszString Receives pointer of the allocated UCS-2 string.1483 * The returned pointer must be freed using RTStrUcs2Free().1484 * @param pwszString UCS-2 string to duplicate.1485 * @deprecated1486 */1487 DECLINLINE(int) RTStrUcs2DupEx(PRTUCS2 *ppwszString, PCRTUCS2 pwszString)1488 {1489 return RTUtf16DupEx(ppwszString, pwszString, 0);1490 }1491 1492 /**1493 * Returns the length of a UCS-2 string in UCS-2 characters1494 * without trailing '\\0'.1495 *1496 * @returns Length of input string in UCS-2 characters.1497 * @param pwszString Pointer the UCS-2 string.1498 * @deprecated1499 */1500 DECLINLINE(size_t) RTStrUcs2Len(PCRTUCS2 pwszString)1501 {1502 return RTUtf16Len(pwszString);1503 }1504 1505 /**1506 * Performs a case sensitive string compare between two UCS-2 strings.1507 *1508 * @returns < 0 if the first string less than the second string.1509 * @returns 0 if the first string identical to the second string.1510 * @returns > 0 if the first string greater than the second string.1511 * @param pwsz1 First UCS-2 string.1512 * @param pwsz2 Second UCS-2 string.1513 * @deprecated1514 */1515 DECLINLINE(int) RTStrUcs2Cmp(register PCRTUCS2 pwsz1, register PCRTUCS2 pwsz2)1516 {1517 return RTUtf16Cmp(pwsz1, pwsz2);1518 }1519 1520 1521 /**1522 1389 * Get the unicode code point at the given string position. 1523 1390 * -
trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r6716 r7418 1182 1182 SHFLSTRING *pFolderName, *pMapName; 1183 1183 int cbString; 1184 PRTU CS2aHostPath, aMapName;1184 PRTUTF16 aHostPath, aMapName; 1185 1185 int rc; 1186 1186 1187 rc = RTStr Utf8ToUcs2(&aHostPath, g_pszShareDir[i]);1187 rc = RTStrToUtf16(g_pszShareDir[i], &aHostPath); 1188 1188 AssertRC(rc); 1189 rc = RTStr Utf8ToUcs2(&aMapName, g_pszShareName[i]);1189 rc = RTStrToUtf16(g_pszShareName[i], &aMapName); 1190 1190 AssertRC(rc); 1191 1191 1192 cbString = (RT StrUcs2Len (aHostPath) + 1) * sizeof (RTUCS2);1192 cbString = (RTUtf16Len (aHostPath) + 1) * sizeof (RTUTF16); 1193 1193 pFolderName = (SHFLSTRING *) RTMemAllocZ (sizeof (SHFLSTRING) + cbString); 1194 1194 Assert (pFolderName); … … 1196 1196 1197 1197 pFolderName->u16Size = cbString; 1198 pFolderName->u16Length = cbString - sizeof(RTU CS2);1198 pFolderName->u16Length = cbString - sizeof(RTUTF16); 1199 1199 1200 1200 parms[0].type = VBOX_HGCM_SVC_PARM_PTR; … … 1202 1202 parms[0].u.pointer.size = sizeof (SHFLSTRING) + cbString; 1203 1203 1204 cbString = (RT StrUcs2Len (aMapName) + 1) * sizeof (RTUCS2);1204 cbString = (RTUtf16Len (aMapName) + 1) * sizeof (RTUTF16); 1205 1205 pMapName = (SHFLSTRING *) RTMemAllocZ (sizeof(SHFLSTRING) + cbString); 1206 1206 Assert (pMapName); … … 1208 1208 1209 1209 pMapName->u16Size = cbString; 1210 pMapName->u16Length = cbString - sizeof (RTU CS2);1210 pMapName->u16Length = cbString - sizeof (RTUTF16); 1211 1211 1212 1212 parms[1].type = VBOX_HGCM_SVC_PARM_PTR; … … 1223 1223 RTMemFree (pFolderName); 1224 1224 RTMemFree (pMapName); 1225 RT StrUcs2Free (aHostPath);1226 RT StrUcs2Free (aMapName);1225 RTUtf16Free (aHostPath); 1226 RTUtf16Free (aMapName); 1227 1227 } 1228 1228 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r5999 r7418 206 206 207 207 char *pszKeys; 208 int rc = RT StrUcs2ToUtf8(&pszKeys, Keys.raw());209 if ( VBOX_SUCCESS(rc))208 int rc = RTUtf16ToUtf8(Keys.raw(), &pszKeys); 209 if (RT_SUCCESS(rc)) 210 210 { 211 211 /* locate it */ … … 420 420 421 421 rc = SUPInstall(); 422 if ( VBOX_SUCCESS(rc))422 if (RT_SUCCESS(rc)) 423 423 return 0; 424 elseif (rc == VERR_NOT_IMPLEMENTED)424 if (rc == VERR_NOT_IMPLEMENTED) 425 425 return 0; 426 else 427 return E_FAIL; 426 return E_FAIL; 428 427 } 429 428 … … 435 434 int CmdModInstall(void) 436 435 { 437 int rc = SUPInstall(); 436 int rc = SUPInstall(); /** @todo r=bird: this cannot be right. */ 438 437 439 438 rc = SUPInstall(); 440 if ( VBOX_SUCCESS(rc))439 if (RT_SUCCESS(rc)) 441 440 return 0; 442 elseif (rc == VERR_NOT_IMPLEMENTED)441 if (rc == VERR_NOT_IMPLEMENTED) 443 442 return 0; 444 else 445 return E_FAIL; 443 return E_FAIL; 446 444 } 447 445 -
trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
r6901 r7418 173 173 char *pszFullPath = NULL; 174 174 175 /* Query UCS2 root prefix for the path, cbRoot is the length in bytes including trailing (RTU CS2)0. */175 /* Query UCS2 root prefix for the path, cbRoot is the length in bytes including trailing (RTUTF16)0. */ 176 176 uint32_t cbRoot = 0; 177 const RTUCS2 *pszRoot = vbsfMappingsQueryHostRoot (root, &cbRoot);178 179 if (!p szRoot || cbRoot == 0)177 PCRTUTF16 pwszRoot = vbsfMappingsQueryHostRoot (root, &cbRoot); 178 179 if (!pwszRoot || cbRoot == 0) 180 180 { 181 181 Log(("vbsfBuildFullPath: invalid root!\n")); … … 188 188 char *utf8Root; 189 189 190 rc = RTUtf16ToUtf8 (p szRoot, &utf8Root);190 rc = RTUtf16ToUtf8 (pwszRoot, &utf8Root); 191 191 if (VBOX_SUCCESS (rc)) 192 192 { … … 229 229 { 230 230 /* Client sends us UCS2, so convert it to UTF8. */ 231 Log(("Root %ls path %.*ls\n", p szRoot, pPath->u16Length/sizeof(pPath->String.ucs2[0]), pPath->String.ucs2));231 Log(("Root %ls path %.*ls\n", pwszRoot, pPath->u16Length/sizeof(pPath->String.ucs2[0]), pPath->String.ucs2)); 232 232 233 233 /* Allocate buffer that will be able to contain … … 236 236 * in worst case. 237 237 */ 238 uint32_t cbFullPath = (cbRoot/sizeof (RTU CS2) + ShflStringLength (pPath)) * 4;238 uint32_t cbFullPath = (cbRoot/sizeof (RTUTF16) + ShflStringLength (pPath)) * 4; 239 239 240 240 pszFullPath = (char *)RTMemAllocZ (cbFullPath); … … 248 248 uint32_t cb = cbFullPath; 249 249 250 rc = RT StrUcs2ToUtf8Ex (&pszFullPath, cb, pszRoot);250 rc = RTUtf16ToUtf8Ex (pwszRoot, RTSTR_MAX, &pszFullPath, cb, NULL); 251 251 if (VBOX_FAILURE(rc)) 252 252 { … … 273 273 { 274 274 /* Convert and copy components. */ 275 RTUCS2 *src = &pPath->String.ucs2[0];275 PRTUTF16 src = &pPath->String.ucs2[0]; 276 276 277 277 /* Correct path delimiters */ … … 291 291 src++; /* we already appended a delimiter to the first part */ 292 292 293 rc = RT StrUcs2ToUtf8Ex (&dst, cb, src);293 rc = RTUtf16ToUtf8Ex (src, RTSTR_MAX, &dst, cb, NULL); 294 294 if (VBOX_FAILURE(rc)) 295 295 { … … 387 387 } 388 388 Assert(*src == RTPATH_DELIMITER && VBOX_SUCCESS(rc)); 389 if ( *src == RTPATH_DELIMITER 389 if ( *src == RTPATH_DELIMITER 390 390 && VBOX_SUCCESS(rc)) 391 391 { … … 654 654 pParms->Result = SHFL_FILE_NOT_FOUND; 655 655 656 /* This actually isn't an error, so correct the rc before return later, 656 /* This actually isn't an error, so correct the rc before return later, 657 657 because the driver (VBoxSF.sys) expects rc = VINF_SUCCESS and checks the result code. */ 658 658 fNoError = true; … … 661 661 pParms->Result = SHFL_PATH_NOT_FOUND; 662 662 663 /* This actually isn't an error, so correct the rc before return later, 663 /* This actually isn't an error, so correct the rc before return later, 664 664 because the driver (VBoxSF.sys) expects rc = VINF_SUCCESS and checks the result code. */ 665 665 fNoError = true; … … 675 675 pParms->Result = SHFL_FILE_EXISTS; 676 676 677 /* This actually isn't an error, so correct the rc before return later, 677 /* This actually isn't an error, so correct the rc before return later, 678 678 because the driver (VBoxSF.sys) expects rc = VINF_SUCCESS and checks the result code. */ 679 fNoError = true; 679 fNoError = true; 680 680 break; 681 681 default: … … 696 696 { 697 697 /* For now, we do not treat a failure here as fatal. */ 698 /* @todo Also set the size for SHFL_CF_ACT_CREATE_IF_NEW if 698 /* @todo Also set the size for SHFL_CF_ACT_CREATE_IF_NEW if 699 699 SHFL_CF_ACT_FAIL_IF_EXISTS is set. */ 700 700 RTFileSetSize(pHandle->file.Handle, pParms->Info.cbObject); … … 755 755 756 756 /* Report the driver that all is okay, we're done here */ 757 if (fNoError) 757 if (fNoError) 758 758 rc = VINF_SUCCESS; 759 759 … … 1205 1205 int rc = VINF_SUCCESS; 1206 1206 PSHFLDIRINFO pSFDEntry; 1207 PRTU CS2 puszString;1207 PRTUTF16 pwszString; 1208 1208 PRTDIR DirHandle; 1209 1209 bool fUtf8; … … 1333 1333 { 1334 1334 pSFDEntry->name.String.ucs2[0] = 0; 1335 p uszString = pSFDEntry->name.String.ucs2;1336 int rc2 = RTStr Utf8ToUcs2Ex(&puszString, pDirEntry->cbName+1, pDirEntry->szName);1335 pwszString = pSFDEntry->name.String.ucs2; 1336 int rc2 = RTStrToUtf16Ex(pDirEntry->szName, RTSTR_MAX, &pwszString, pDirEntry->cbName+1, NULL); 1337 1337 AssertRC(rc2); 1338 1338 1339 pSFDEntry->name.u16Length = RT StrUcs2Len (pSFDEntry->name.String.ucs2) * 2;1339 pSFDEntry->name.u16Length = RTUtf16Len (pSFDEntry->name.String.ucs2) * 2; 1340 1340 pSFDEntry->name.u16Size = pSFDEntry->name.u16Length + 2; 1341 1341 -
trunk/src/VBox/Main/ConsoleImpl.cpp
r7327 r7418 4480 4480 Log (("Adding shared folder '%ls' -> '%ls'\n", aName, aData.mHostPath.raw())); 4481 4481 4482 cbString = (RT StrUcs2Len (aData.mHostPath) + 1) * sizeof (RTUCS2);4482 cbString = (RTUtf16Len (aData.mHostPath) + 1) * sizeof (RTUTF16); 4483 4483 if (cbString >= UINT16_MAX) 4484 4484 return setError (E_INVALIDARG, tr ("The name is too long")); … … 4488 4488 4489 4489 pFolderName->u16Size = (uint16_t)cbString; 4490 pFolderName->u16Length = (uint16_t)cbString - sizeof(RTU CS2);4490 pFolderName->u16Length = (uint16_t)cbString - sizeof(RTUTF16); 4491 4491 4492 4492 parms[0].type = VBOX_HGCM_SVC_PARM_PTR; … … 4494 4494 parms[0].u.pointer.size = sizeof (SHFLSTRING) + (uint16_t)cbString; 4495 4495 4496 cbString = (RT StrUcs2Len (aName) + 1) * sizeof (RTUCS2);4496 cbString = (RTUtf16Len (aName) + 1) * sizeof (RTUTF16); 4497 4497 if (cbString >= UINT16_MAX) 4498 4498 { … … 4505 4505 4506 4506 pMapName->u16Size = (uint16_t)cbString; 4507 pMapName->u16Length = (uint16_t)cbString - sizeof (RTU CS2);4507 pMapName->u16Length = (uint16_t)cbString - sizeof (RTUTF16); 4508 4508 4509 4509 parms[1].type = VBOX_HGCM_SVC_PARM_PTR; … … 4551 4551 Log (("Removing shared folder '%ls'\n", aName)); 4552 4552 4553 cbString = (RT StrUcs2Len (aName) + 1) * sizeof (RTUCS2);4553 cbString = (RTUtf16Len (aName) + 1) * sizeof (RTUTF16); 4554 4554 if (cbString >= UINT16_MAX) 4555 4555 return setError (E_INVALIDARG, tr ("The name is too long")); … … 4559 4559 4560 4560 pMapName->u16Size = (uint16_t)cbString; 4561 pMapName->u16Length = (uint16_t)cbString - sizeof (RTU CS2);4561 pMapName->u16Length = (uint16_t)cbString - sizeof (RTUTF16); 4562 4562 4563 4563 parms.type = VBOX_HGCM_SVC_PARM_PTR; … … 6121 6121 BSTR str = NULL; 6122 6122 *phrc = S_OK; 6123 #define STR_CONV() do { rc = RT StrUcs2ToUtf8(&psz, str); RC_CHECK(); } while (0)6123 #define STR_CONV() do { rc = RTUtf16ToUtf8(str, &psz); RC_CHECK(); } while (0) 6124 6124 #define STR_FREE() do { if (str) { SysFreeString(str); str = NULL; } if (psz) { RTStrFree(psz); psz = NULL; } } while (0) 6125 6125 #define RC_CHECK() do { if (VBOX_FAILURE(rc)) { AssertMsgFailed(("rc=%Vrc\n", rc)); STR_FREE(); return rc; } } while (0) -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r7359 r7418 98 98 unsigned i; 99 99 100 #define STR_CONV() do { rc = RT StrUcs2ToUtf8(&psz, str); RC_CHECK(); } while (0)100 #define STR_CONV() do { rc = RTUtf16ToUtf8(str, &psz); RC_CHECK(); } while (0) 101 101 #define STR_FREE() do { if (str) { SysFreeString(str); str = NULL; } if (psz) { RTStrFree(psz); psz = NULL; } } while (0) 102 102 #define RC_CHECK() do { if (VBOX_FAILURE(rc)) { AssertMsgFailed(("rc=%Vrc\n", rc)); STR_FREE(); return rc; } } while (0) -
trunk/src/VBox/Main/glue/com.cpp
r6076 r7418 51 51 #else 52 52 #define VBOX_USER_HOME_SUFFIX ".VirtualBox" 53 #endif 53 #endif 54 54 55 55 … … 117 117 iinfo->GetNameShared (&iname); 118 118 char *utf8IName = NULL; 119 if ( VBOX_SUCCESS (RTStrCurrentCPToUtf8 (&utf8IName, iname)))119 if (RT_SUCCESS (RTStrCurrentCPToUtf8 (&utf8IName, iname))) 120 120 { 121 121 PRTUCS2 ucs2IName = NULL; 122 if ( VBOX_SUCCESS (RTStrUtf8ToUcs2 (&ucs2IName, utf8IName)))122 if (RT_SUCCESS (RTStrToUtf16 (utf8IName, &ucs2IName))) 123 123 { 124 124 *aName = SysAllocString ((OLECHAR *) ucs2IName); 125 RT StrUcs2Free (ucs2IName);125 RTUtf16Free (ucs2IName); 126 126 } 127 127 RTStrFree (utf8IName); … … 170 170 if (RT_SUCCESS (vrc)) 171 171 { 172 size_t len = 172 size_t len = 173 173 RTStrPrintf (aDir, aDirLen, "%s%c%s", 174 174 path, RTPATH_DELIMITER, VBOX_USER_HOME_SUFFIX); … … 187 187 188 188 /* static */ 189 const Guid Guid::Empty; /* default ctor is OK */ 189 const Guid Guid::Empty; /* default ctor is OK */ 190 190 191 191 } /* namespace com */ -
trunk/src/VBox/Main/linux/helpers.cpp
r5999 r7418 176 176 unsigned int SysStringByteLen(BSTR bstr) 177 177 { 178 return RT StrUcs2Len(bstr) * sizeof(OLECHAR);178 return RTUtf16Len(bstr) * sizeof(OLECHAR); 179 179 } 180 180 … … 186 186 unsigned int SysStringLen(BSTR bstr) 187 187 { 188 return RT StrUcs2Len(bstr);188 return RTUtf16Len(bstr); 189 189 } -
trunk/src/VBox/Main/testcase/tstAPI.cpp
r7207 r7418 379 379 char *driveNameUtf8; 380 380 dvdDrive->GetDriveName(&driveName); 381 RT StrUcs2ToUtf8(&driveNameUtf8, (PCRTUCS2)driveName);381 RTUtf16ToUtf8((PCRTUTF16)driveName, &driveNameUtf8); 382 382 printf("Host DVD drive name: %s\n", driveNameUtf8); 383 383 RTStrFree(driveNameUtf8); … … 404 404 char *driveNameUtf8; 405 405 floppyDrive->GetDriveName(&driveName); 406 RT StrUcs2ToUtf8(&driveNameUtf8, (PCRTUCS2)driveName);406 RTUtf16ToUtf8((PCRTUTF16)driveName, &driveNameUtf8); 407 407 printf("Host floppy drive name: %s\n", driveNameUtf8); 408 408 RTStrFree(driveNameUtf8); -
trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
r5999 r7418 419 419 * Setup the returned data. 420 420 */ 421 pDirEntry->c ucShortName = 0;422 pDirEntry-> uszShortName[0] = 0;421 pDirEntry->cwcShortName = 0; 422 pDirEntry->wszShortName[0] = 0; 423 423 pDirEntry->cbName = (uint16_t)cchName; 424 424 Assert(pDirEntry->cbName == cchName); -
trunk/src/VBox/Runtime/r3/win/dir-win.cpp
r6971 r7418 52 52 53 53 /* 54 * Convert to U CS2.55 */ 56 PRTU CS2 pucszString;57 int rc = RTStr Utf8ToUcs2(&pucszString, pszPath);54 * Convert to UTF-16. 55 */ 56 PRTUTF16 pwszString; 57 int rc = RTStrToUtf16(pszPath, &pwszString); 58 58 AssertRC(rc); 59 59 if (RT_SUCCESS(rc)) … … 62 62 * Query and check attributes. 63 63 */ 64 DWORD dwAttr = GetFileAttributesW((LPCWSTR)p ucszString);64 DWORD dwAttr = GetFileAttributesW((LPCWSTR)pwszString); 65 65 fRc = dwAttr != INVALID_FILE_ATTRIBUTES 66 66 && (dwAttr & FILE_ATTRIBUTE_DIRECTORY); 67 67 68 RT StrUcs2Free(pucszString);68 RTUtf16Free(pwszString); 69 69 } 70 70 … … 84 84 { 85 85 /* 86 * Convert to U CS2.86 * Convert to UTF-16. 87 87 */ 88 PRTU CS2 pucszString;89 rc = RTStr Utf8ToUcs2(&pucszString, pszPath);88 PRTUTF16 pwszString; 89 rc = RTStrToUtf16(pszPath, &pwszString); 90 90 AssertRC(rc); 91 91 if (RT_SUCCESS(rc)) … … 94 94 * Create the directory. 95 95 */ 96 if (CreateDirectoryW((LPCWSTR)p ucszString, NULL))96 if (CreateDirectoryW((LPCWSTR)pwszString, NULL)) 97 97 rc = VINF_SUCCESS; 98 98 else … … 104 104 if (RT_SUCCESS(rc)) 105 105 { 106 if (SetFileAttributesW((LPCWSTR)p ucszString, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED))106 if (SetFileAttributesW((LPCWSTR)pwszString, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)) 107 107 rc = VINF_SUCCESS; 108 108 else … … 110 110 } 111 111 112 RT StrUcs2Free(pucszString);112 RTUtf16Free(pwszString); 113 113 } 114 114 } … … 127 127 { 128 128 /* 129 * Convert to U CS2.130 */ 131 PRTU CS2 pucszString;132 int rc = RTStr Utf8ToUcs2(&pucszString, pszPath);129 * Convert to UTF-16. 130 */ 131 PRTUTF16 pwszString; 132 int rc = RTStrToUtf16(pszPath, &pwszString); 133 133 AssertRC(rc); 134 134 if (RT_SUCCESS(rc)) … … 137 137 * Remove the directory. 138 138 */ 139 if (RemoveDirectoryW((LPCWSTR)p ucszString))139 if (RemoveDirectoryW((LPCWSTR)pwszString)) 140 140 rc = VINF_SUCCESS; 141 141 else 142 142 rc = RTErrConvertFromWin32(GetLastError()); 143 143 144 RT StrUcs2Free(pucszString);144 RTUtf16Free(pwszString); 145 145 } 146 146 … … 181 181 int rc = VINF_SUCCESS; 182 182 #ifndef RT_DONT_CONVERT_FILENAMES 183 PRTU CS2 puszName;184 rc = RTStr Utf8ToUcs2(&puszName, pszPathBuf);183 PRTUTF16 pwszName; 184 rc = RTStrToUtf16(pszPathBuf, &pwszName); 185 185 if (RT_SUCCESS(rc)) 186 186 { 187 pDir->hDir = FindFirstFileW((LPCWSTR)p uszName, &pDir->Data);187 pDir->hDir = FindFirstFileW((LPCWSTR)pwszName, &pDir->Data); 188 188 #else 189 189 pDir->hDir = FindFirstFileA(pszPathBuf, &pDir->Data); … … 197 197 rc = RTErrConvertFromWin32(GetLastError()); 198 198 #ifndef RT_DONT_CONVERT_FILENAMES 199 RT StrUcs2Free(puszName);199 RTUtf16Free(pwszName); 200 200 } 201 201 #endif … … 430 430 { 431 431 /* copy and calc length */ 432 PCRTU CS2 pucSrc = (PCRTUCS2)pDir->Data.cAlternateFileName;433 PRTU CS2 pucDst = pDirEntry->uszShortName;434 while (*p ucSrc)435 *p ucDst++ = *pucSrc++;436 pDirEntry->c ucShortName = pucDst - &pDirEntry->uszShortName[0];432 PCRTUTF16 pwszSrc = (PCRTUTF16)pDir->Data.cAlternateFileName; 433 PRTUTF16 pwszDst = pDirEntry->wszShortName; 434 while (*pwszSrc) 435 *pwszDst++ = *pwszSrc++; 436 pDirEntry->cwcShortName = pwszDst - &pDirEntry->wszShortName[0]; 437 437 /* zero the rest */ 438 const PRTU CS2 pucEnd = &pDirEntry->uszShortName[ELEMENTS(pDirEntry->uszShortName)];439 while (p ucDst < pucEnd)440 *p ucDst++ = '\0';438 const PRTUTF16 pwszEnd = &pDirEntry->wszShortName[RT_ELEMENTS(pDirEntry->wszShortName)]; 439 while (pwszDst < pwszEnd) 440 *pwszDst++ = '\0'; 441 441 } 442 442 else 443 443 #endif 444 444 { 445 memset(pDirEntry-> uszShortName, 0, sizeof(pDirEntry->uszShortName));446 pDirEntry->c ucShortName = 0;445 memset(pDirEntry->wszShortName, 0, sizeof(pDirEntry->wszShortName)); 446 pDirEntry->cwcShortName = 0; 447 447 } 448 448 -
trunk/src/VBox/Runtime/r3/win/fs-win.cpp
r5999 r7418 87 87 88 88 #ifndef RT_DONT_CONVERT_FILENAMES 89 89 90 /** 90 91 * Finds the root of the specified volume. … … 92 93 * @returns iprt status code. 93 94 * @param pszFsPath Path within the filesystem. Verified as one byte or more. 94 * @param pp uszFsRoot Where to store the returned string. Free with rtFsFreeRoot(),95 */ 96 static int rtFsGetRoot(const char *pszFsPath, PRTU CS2 *ppuszFsRoot)95 * @param ppwszFsRoot Where to store the returned string. Free with rtFsFreeRoot(), 96 */ 97 static int rtFsGetRoot(const char *pszFsPath, PRTUTF16 *ppwszFsRoot) 97 98 { 98 99 /* … … 100 101 */ 101 102 if (rtFsIsRoot(pszFsPath)) 102 return RTStr Utf8ToUcs2(ppuszFsRoot, pszFsPath);103 return RTStrToUtf16(pszFsPath, ppwszFsRoot); 103 104 104 105 /* … … 120 121 * Convert the path. 121 122 */ 122 rc = RTStr Utf8ToUcs2(ppuszFsRoot, szFullPath);123 rc = RTStrToUtf16(szFullPath, ppwszFsRoot); 123 124 if (RT_FAILURE(rc)) 124 125 return rc == VERR_BUFFER_OVERFLOW ? VERR_FILENAME_TOO_LONG : rc; … … 127 128 * Walk the path until our proper API is happy or there is no more path left. 128 129 */ 129 PRTU CS2 puszStart = *ppuszFsRoot;130 if (!GetVolumeInformationW(p uszStart, NULL, 0, NULL, NULL, 0, NULL, 0))131 { 132 PRTU CS2 puszEnd = puszStart + RTStrUcs2Len(puszStart);133 PRTU CS2 puszMin = puszStart + 2;130 PRTUTF16 pwszStart = *ppwszFsRoot; 131 if (!GetVolumeInformationW(pwszStart, NULL, 0, NULL, NULL, 0, NULL, 0)) 132 { 133 PRTUTF16 pwszEnd = pwszStart + RTUtf16Len(pwszStart); 134 PRTUTF16 pwszMin = pwszStart + 2; 134 135 do 135 136 { 136 137 /* Strip off the last path component. */ 137 while (p uszEnd-- > puszMin)138 if (RTPATH_IS_SLASH(*p uszEnd))138 while (pwszEnd-- > pwszMin) 139 if (RTPATH_IS_SLASH(*pwszEnd)) 139 140 break; 140 AssertReturn(p uszEnd >= puszMin, VERR_INTERNAL_ERROR); /* leaks, but that's irrelevant for an internal error. */141 p uszEnd[1] = '\0';142 } while (!GetVolumeInformationW(p uszStart, NULL, 0, NULL, NULL, 0, NULL, 0));141 AssertReturn(pwszEnd >= pwszMin, VERR_INTERNAL_ERROR); /* leaks, but that's irrelevant for an internal error. */ 142 pwszEnd[1] = '\0'; 143 } while (!GetVolumeInformationW(pwszStart, NULL, 0, NULL, NULL, 0, NULL, 0)); 143 144 } 144 145 … … 149 150 * Frees string returned by rtFsGetRoot(). 150 151 */ 151 static void rtFsFreeRoot(PRTU CS2 puszFsRoot)152 { 153 RT StrUcs2Free(puszFsRoot);154 } 155 156 #else 152 static void rtFsFreeRoot(PRTUTF16 pwszFsRoot) 153 { 154 RTUtf16Free(pwszFsRoot); 155 } 156 157 #else /* RT_DONT_CONVERT_FILENAMES */ 157 158 158 159 /** … … 214 215 RTStrFree(pszFsRoot); 215 216 } 216 #endif 217 218 #endif /* RT_DONT_CONVERT_FILENAMES*/ 217 219 218 220 … … 225 227 AssertMsgReturn(VALID_PTR(pszFsPath) && *pszFsPath, ("%p", pszFsPath), VERR_INVALID_PARAMETER); 226 228 #ifndef RT_DONT_CONVERT_FILENAMES 227 PRTU CS2 puszFsRoot;228 int rc = rtFsGetRoot(pszFsPath, &p uszFsRoot);229 PRTUTF16 pwszFsRoot; 230 int rc = rtFsGetRoot(pszFsPath, &pwszFsRoot); 229 231 #else 230 232 char pszFsRoot; … … 242 244 ULARGE_INTEGER cbFree; 243 245 #ifndef RT_DONT_CONVERT_FILENAMES 244 if (GetDiskFreeSpaceExW(p uszFsRoot, &cbFree, &cbTotal, NULL))246 if (GetDiskFreeSpaceExW(pwszFsRoot, &cbFree, &cbTotal, NULL)) 245 247 #else 246 248 if (GetDiskFreeSpaceExA(pszFsRoot, &cbFree, &cbTotal, NULL)) … … 271 273 DWORD cSectorsPerCluster; 272 274 #ifndef RT_DONT_CONVERT_FILENAMES 273 if (GetDiskFreeSpaceW(p uszFsRoot, &cSectorsPerCluster, &cbSector, &dwDummy1, &dwDummy2))275 if (GetDiskFreeSpaceW(pwszFsRoot, &cSectorsPerCluster, &cbSector, &dwDummy1, &dwDummy2)) 274 276 #else 275 277 if (GetDiskFreeSpaceA(pszFsRoot, &cSectorsPerCluster, &cbSector, &dwDummy1, &dwDummy2)) … … 291 293 292 294 #ifndef RT_DONT_CONVERT_FILENAMES 293 rtFsFreeRoot(p uszFsRoot);295 rtFsFreeRoot(pwszFsRoot); 294 296 #else 295 297 rtFsFreeRoot(pszFsRoot); … … 314 316 AssertMsgReturn(VALID_PTR(pu32Serial), ("%p", pu32Serial), VERR_INVALID_PARAMETER); 315 317 #ifndef RT_DONT_CONVERT_FILENAMES 316 PRTU CS2 puszFsRoot;317 int rc = rtFsGetRoot(pszFsPath, &p uszFsRoot);318 PRTUTF16 pwszFsRoot; 319 int rc = rtFsGetRoot(pszFsPath, &pwszFsRoot); 318 320 #else 319 321 char pszFsRoot; … … 330 332 DWORD dwSerial; 331 333 #ifndef RT_DONT_CONVERT_FILENAMES 332 if (GetVolumeInformationW(p uszFsRoot, NULL, 0, &dwSerial, &dwMaxName, &dwFlags, NULL, 0))334 if (GetVolumeInformationW(pwszFsRoot, NULL, 0, &dwSerial, &dwMaxName, &dwFlags, NULL, 0)) 333 335 #else 334 336 if (GetVolumeInformationA(pszFsRoot, NULL, 0, &dwSerial, &dwMaxName, &dwFlags, NULL, 0)) … … 344 346 345 347 #ifndef RT_DONT_CONVERT_FILENAMES 346 RT StrUcs2Free(puszFsRoot);347 #else 348 RTStr Ucs2Free(pszFsRoot);348 RTUtf16Free(pwszFsRoot); 349 #else 350 RTStrFree(pszFsRoot); 349 351 #endif 350 352 return rc; … … 367 369 AssertMsgReturn(VALID_PTR(pProperties), ("%p", pProperties), VERR_INVALID_PARAMETER); 368 370 #ifndef RT_DONT_CONVERT_FILENAMES 369 PRTU CS2 puszFsRoot;370 int rc = rtFsGetRoot(pszFsPath, &p uszFsRoot);371 PRTUTF16 pwszFsRoot; 372 int rc = rtFsGetRoot(pszFsPath, &pwszFsRoot); 371 373 #else 372 374 char pszFsRoot; … … 383 385 DWORD dwSerial; 384 386 #ifndef RT_DONT_CONVERT_FILENAMES 385 if (GetVolumeInformationW(p uszFsRoot, NULL, 0, &dwSerial, &dwMaxName, &dwFlags, NULL, 0))387 if (GetVolumeInformationW(pwszFsRoot, NULL, 0, &dwSerial, &dwMaxName, &dwFlags, NULL, 0)) 386 388 #else 387 389 if (GetVolumeInformationA(pszFsRoot, NULL, 0, &dwSerial, &dwMaxName, &dwFlags, NULL, 0)) … … 406 408 407 409 #ifndef RT_DONT_CONVERT_FILENAMES 408 RT StrUcs2Free(puszFsRoot);409 #else 410 RTStr Ucs2Free(pszFsRoot);410 RTUtf16Free(pwszFsRoot); 411 #else 412 RTStrFree(pszFsRoot); 411 413 #endif 412 414 return rc; -
trunk/src/VBox/Runtime/r3/win/path-win.cpp
r7403 r7418 193 193 * Convert and return. 194 194 */ 195 return RT StrUcs2ToUtf8Ex(&pszPath, cchPath, &wszPath[0]);195 return RTUtf16ToUtf8Ex(&wszPath[0], RTSTR_MAX, &pszPath, cchPath, NULL); 196 196 } 197 197 … … 225 225 #ifndef RT_DONT_CONVERT_FILENAMES 226 226 PRTUTF16 pwszPath; 227 int rc = RTStr Utf8ToUcs2(&pwszPath, pszPath);227 int rc = RTStrToUtf16(pszPath, &pwszPath); 228 228 if (RT_FAILURE(rc)) 229 229 return rc; … … 477 477 #ifndef RT_DONT_CONVERT_FILENAMES 478 478 PRTUTF16 pwszPath; 479 int rc = RTStr Utf8ToUcs2(&pwszPath, pszPath);479 int rc = RTStrToUtf16(pszPath, &pwszPath); 480 480 if (RT_SUCCESS(rc)) 481 481 { -
trunk/src/VBox/Runtime/r3/win/utf8-win.cpp
r5999 r7418 67 67 * Convert to wide char first. 68 68 */ 69 PRTU CS2 pucszString = NULL;70 int rc = RTStr Utf8ToUcs2(&pucszString, pszString);69 PRTUTF16 pwszString = NULL; 70 int rc = RTStrToUtf16(pszString, &pwszString); 71 71 if (RT_FAILURE(rc)) 72 72 return rc; … … 75 75 * First calc result string length. 76 76 */ 77 int cbResult = WideCharToMultiByte(CP_ACP, 0, p ucszString, -1, NULL, 0, NULL, NULL);77 int cbResult = WideCharToMultiByte(CP_ACP, 0, pwszString, -1, NULL, 0, NULL, NULL); 78 78 if (cbResult > 0) 79 79 { … … 87 87 * Do the translation. 88 88 */ 89 if (WideCharToMultiByte(CP_ACP, 0, p ucszString, -1, lpString, cbResult, NULL, NULL) > 0)89 if (WideCharToMultiByte(CP_ACP, 0, pwszString, -1, lpString, cbResult, NULL, NULL) > 0) 90 90 { 91 91 /* ok */ 92 92 *ppszString = lpString; 93 RTMemTmpFree(p ucszString);93 RTMemTmpFree(pwszString); 94 94 return VINF_SUCCESS; 95 95 } … … 111 111 rc = RTErrConvertFromWin32(iLastErr); 112 112 } 113 RTMemTmpFree(p ucszString);113 RTMemTmpFree(pwszString); 114 114 return rc; 115 115 } … … 129 129 *ppszString = NULL; 130 130 131 /** @todo is there a quicker way? Currently: ACP -> U CS-2-> UTF-8 */131 /** @todo is there a quicker way? Currently: ACP -> UTF-16 -> UTF-8 */ 132 132 133 133 size_t cch = strlen(pszString); … … 145 145 */ 146 146 int rc; 147 int c uc = MultiByteToWideChar(CP_ACP, 0, pszString, -1, NULL, 0);148 if (c uc > 0)147 int cwc = MultiByteToWideChar(CP_ACP, 0, pszString, -1, NULL, 0); 148 if (cwc > 0) 149 149 { 150 150 /* 151 151 * Alloc space for result buffer. 152 152 */ 153 PRTU CS2 pucszString = (PRTUCS2)RTMemTmpAlloc(cuc * sizeof(RTUCS2));154 if (p ucszString)153 PRTUTF16 pwszString = (PRTUTF16)RTMemTmpAlloc(cwc * sizeof(RTUTF16)); 154 if (pwszString) 155 155 { 156 156 /* 157 157 * Do the translation. 158 158 */ 159 if (MultiByteToWideChar(CP_ACP, 0, pszString, -1, p ucszString, cuc) > 0)159 if (MultiByteToWideChar(CP_ACP, 0, pszString, -1, pwszString, cwc) > 0) 160 160 { 161 161 /* 162 * Now we got U CS-2. Convert to UTF-8162 * Now we got UTF-16, convert it to UTF-8 163 163 */ 164 rc = RT StrUcs2ToUtf8(ppszString, pucszString);165 RTMemTmpFree(p ucszString);164 rc = RTUtf16ToUtf8(pwszString, ppszString); 165 RTMemTmpFree(pwszString); 166 166 return rc; 167 167 } 168 RTMemTmpFree(p ucszString);168 RTMemTmpFree(pwszString); 169 169 /* translation error */ 170 170 int iLastErr = GetLastError(); -
trunk/src/VBox/Runtime/testcase/tstDir.cpp
r5999 r7418 160 160 DirEntry.Info.ModificationTime, 161 161 DirEntry.Info.AccessTime); 162 if (fShortName && DirEntry.c ucShortName)163 RTPrintf(" %2d %lS\n", DirEntry.c ucShortName, DirEntry.uszShortName);162 if (fShortName && DirEntry.cwcShortName) 163 RTPrintf(" %2d %lS\n", DirEntry.cwcShortName, DirEntry.wszShortName); 164 164 else 165 165 RTPrintf(" %2d %s\n", DirEntry.cbName, DirEntry.szName); -
trunk/src/VBox/Runtime/testcase/tstPath.cpp
r5999 r7418 66 66 if (RT_SUCCESS(rc)) 67 67 RTPrintf("UserHome={%s}\n", szPath); 68 68 69 69 /* 70 70 * RTPathAbsEx … … 73 73 static const char *aInput[] = 74 74 { 75 // NULL, NULL, -- assertion in RTStr Utf8ToUcs275 // NULL, NULL, -- assertion in RTStrToUtf16 76 76 NULL, "/absolute/..", 77 77 NULL, "/absolute\\\\../..", -
trunk/src/VBox/Runtime/testcase/tstUtf8.cpp
r5999 r7418 50 50 * Generate a random codepoint for simple UTF-16 encoding. 51 51 */ 52 static RTUTF16 GetRandU cs2(void)52 static RTUTF16 GetRandUtf16(void) 53 53 { 54 54 RTUTF16 wc; … … 100 100 srand((unsigned)RTTimeNanoTS()); 101 101 for (int i = 0; i < 30; i++) 102 pwszRand[i] = GetRandU cs2();102 pwszRand[i] = GetRandUtf16(); 103 103 pwszRand[30] = 0; 104 104 … … 141 141 srand((unsigned)RTTimeNanoTS()); 142 142 for (int i = 0; i < 30; i++) 143 pwszRand[i] = GetRandU cs2();143 pwszRand[i] = GetRandUtf16(); 144 144 pwszRand[30] = 0; 145 145 rc = RTUtf16ToUtf8(pwszRand, &pszUtf8); … … 181 181 srand((unsigned)RTTimeNanoTS()); 182 182 for (int i = 0; i < 30; i++) 183 pwszRand[i] = GetRandU cs2();183 pwszRand[i] = GetRandUtf16(); 184 184 pwszRand[30] = 0; 185 185 … … 223 223 srand((unsigned)RTTimeNanoTS()); 224 224 for (int i = 0; i < 30; i++) 225 pwszRand[i] = GetRandU cs2();225 pwszRand[i] = GetRandUtf16(); 226 226 pwszRand[30] = 0; 227 227 … … 261 261 srand((unsigned)RTTimeNanoTS()); 262 262 for (int i = 0; i < 30; i++) 263 pwszRand[i] = GetRandU cs2();263 pwszRand[i] = GetRandUtf16(); 264 264 pwszRand[30] = 0; 265 265 … … 280 280 srand((unsigned)RTTimeNanoTS()); 281 281 for (int i = 0; i < 30; i++) 282 pwszRand[i] = GetRandU cs2();282 pwszRand[i] = GetRandUtf16(); 283 283 pwszRand[30] = 0; 284 284 … … 488 488 } 489 489 490 PRTUTF16 p uszUcs2;491 rc = RTStrToUtf16(pszUtf8, &p uszUcs2);490 PRTUTF16 pwszUtf16; 491 rc = RTStrToUtf16(pszUtf8, &pwszUtf16); 492 492 if (rc == VINF_SUCCESS) 493 493 { 494 if (mymemcmp(p uszUcs2, g_wszAll, sizeof(g_wszAll), 16))494 if (mymemcmp(pwszUtf16, g_wszAll, sizeof(g_wszAll), 16)) 495 495 { 496 496 RTPrintf("tstUtf8: FAILURE - the full #1: UTF-8 -> UTF-16 failed compare!\n"); 497 497 g_cErrors++; 498 498 } 499 RTUtf16Free(p uszUcs2);499 RTUtf16Free(pwszUtf16); 500 500 } 501 501 else … … 517 517 */ 518 518 RTPrintf("tstUtf8: #2: UTF-8 -> UTF-16 -> UTF-8...\n"); 519 PRTUTF16 p uszUcs2;520 rc = RTStrToUtf16(&g_szAll[0], &p uszUcs2);519 PRTUTF16 pwszUtf16; 520 rc = RTStrToUtf16(&g_szAll[0], &pwszUtf16); 521 521 if (rc == VINF_SUCCESS) 522 522 { 523 if (mymemcmp(p uszUcs2, g_wszAll, sizeof(g_wszAll), 16))523 if (mymemcmp(pwszUtf16, g_wszAll, sizeof(g_wszAll), 16)) 524 524 { 525 525 RTPrintf("tstUtf8: FAILURE - the full #2: UTF-8 -> UTF-16 failed compare!\n"); … … 528 528 529 529 char *pszUtf8; 530 rc = RTUtf16ToUtf8(p uszUcs2, &pszUtf8);530 rc = RTUtf16ToUtf8(pwszUtf16, &pszUtf8); 531 531 if (rc == VINF_SUCCESS) 532 532 { … … 543 543 g_cErrors++; 544 544 } 545 RT StrUcs2Free(puszUcs2);545 RTUtf16Free(pwszUtf16); 546 546 } 547 547 else
Note:
See TracChangeset
for help on using the changeset viewer.