Changeset 39189 in vbox
- Timestamp:
- Nov 3, 2011 2:23:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp
r38785 r39189 327 327 for (; pDrList; pDrList = pDrList->pNext) 328 328 { 329 LPSTR *lppszString = NULL;329 char ** lppszString = NULL; 330 330 if (pConInfo->DeviceDescriptor.iManufacturer && pDrList->iDr == pConInfo->DeviceDescriptor.iManufacturer) 331 331 { 332 lppszString = ( LPSTR*)&pDev->pszManufacturer;332 lppszString = (char**)&pDev->pszManufacturer; 333 333 } 334 334 else if (pConInfo->DeviceDescriptor.iProduct && pDrList->iDr == pConInfo->DeviceDescriptor.iProduct) 335 335 { 336 lppszString = ( LPSTR*)&pDev->pszProduct;336 lppszString = (char**)&pDev->pszProduct; 337 337 } 338 338 else if (pConInfo->DeviceDescriptor.iSerialNumber && pDrList->iDr == pConInfo->DeviceDescriptor.iSerialNumber) 339 339 { 340 lppszString = ( LPSTR*)&pDev->pszSerialNumber;340 lppszString = (char**)&pDev->pszSerialNumber; 341 341 } 342 342 343 343 if (lppszString) 344 344 { 345 char *pStringUTF8 = NULL;346 345 /** @todo r=bird: This code is making bad asumptions that strings are sane and 347 346 * that stuff succeeds: 348 347 * http://vbox.innotek.de/pipermail/vbox-dev/2011-August/004516.html 349 348 * 350 * Also, why is this code converting stuff to the ANSI code page?!? If 351 * That's somehow required, the reason must be documented since all strings in 352 * VBox are UTF-8 unless explicitly stated otherwise! */ 353 RTUtf16ToUtf8((PCRTUTF16)pDrList->StrDr.bString, &pStringUTF8); 354 RTStrUtf8ToCurrentCP(lppszString, pStringUTF8); 355 RTStrFree(pStringUTF8); 349 * */ 350 RTUtf16ToUtf8((PCRTUTF16)pDrList->StrDr.bString, lppszString); 356 351 if (pDrList->iDr == pConInfo->DeviceDescriptor.iSerialNumber) 357 352 {
Note:
See TracChangeset
for help on using the changeset viewer.