- Timestamp:
- Oct 1, 2020 8:26:56 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/testcase/tstVBoxAPIXPCOM.cpp
r82968 r86402 105 105 */ 106 106 IMachine **machines = NULL; 107 PRUint32 machineCnt= 0;108 109 rc = virtualBox->GetMachines(& machineCnt, &machines);107 PRUint32 cMachines = 0; 108 109 rc = virtualBox->GetMachines(&cMachines, &machines); 110 110 if (NS_SUCCEEDED(rc)) 111 111 { … … 113 113 * Iterate through the collection 114 114 */ 115 for (PRUint32 i = 0; i < machineCnt; ++ i)115 for (PRUint32 i = 0; i < cMachines; ++ i) 116 116 { 117 117 IMachine *machine = machines[i]; … … 168 168 } 169 169 } 170 nsMemory::Free(machines); 170 171 } 171 172 printf("----------------------------------------------------\n\n"); … … 433 434 /////////////////////////////////////////////////////////////////////////////// 434 435 435 int main( )436 int main(int argc, char **argv) 436 437 { 437 438 /* … … 450 451 return -1; 451 452 } 453 454 #if 1 /* Please ignore this! It is very very crude. */ 455 char szTmp[8192]; 456 if (!getenv("VBOX_XPCOM_HOME")) 457 { 458 strcpy(szTmp, argv[0]); 459 *strrchr(szTmp, '/') = '\0'; 460 strcat(szTmp, "/.."); 461 fprintf(stderr, "tstVBoxAPIXPCOM: VBOX_XPCOM_HOME is not set, using '%s' instead\n", szTmp); 462 setenv("VBOX_XPCOM_HOME", szTmp, 1); 463 } 464 #endif 465 (void)argc; (void)argv; 452 466 453 467 nsresult rc;
Note:
See TracChangeset
for help on using the changeset viewer.