Changeset 38636 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Sep 5, 2011 1:49:45 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 73843
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r38417 r38636 244 244 * the support driver. 245 245 */ 246 RTR3Init ();246 RTR3InitExe(argc, &argv, 0); 247 247 248 248 /* … … 329 329 if (FAILED(hrc)) 330 330 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to initialize COM!"); 331 332 /*333 * The input is ASSUMED to be in the current process codeset (NT guarantees334 * ACP, unixy systems doesn't guarantee anything). This loop converts all335 * the argv[*] strings to UTF-8, which is a tad ugly but who cares.336 * (As a rule all strings in VirtualBox are UTF-8.)337 */338 for (int i = iCmdArg; i < argc; i++)339 {340 char *pszConverted;341 int rc = RTStrCurrentCPToUtf8(&pszConverted, argv[i]);342 if (RT_SUCCESS(rc))343 argv[i] = pszConverted;344 else345 /* Conversion was not possible,probably due to invalid characters.346 * Keep in mind that we do RTStrFree on the whole array below. */347 argv[i] = RTStrDup(argv[i]);348 }349 331 350 332 RTEXITCODE rcExit = RTEXITCODE_FAILURE; … … 500 482 com::Shutdown(); 501 483 502 /*503 * Free converted argument vector504 */505 for (int i = iCmdArg; i < argc; i++)506 {507 RTStrFree(argv[i]);508 argv[i] = NULL;509 }510 511 484 return rcExit; 512 485 #else /* VBOX_ONLY_DOCS */
Note:
See TracChangeset
for help on using the changeset viewer.