Changeset 16533 in vbox
- Timestamp:
- Feb 5, 2009 5:26:22 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Main/cbinding/tstLinuxC.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/cbinding/tstLinuxC.c
r16500 r16533 301 301 int main(int argc, char **argv) 302 302 { 303 IVirtualBox *vbox = NULL;304 ISession *session = NULL;305 PRUint32 revision = 0;306 PRUnichar *version _= NULL;307 PRUnichar *homefolder _= NULL;303 IVirtualBox *vbox = NULL; 304 ISession *session = NULL; 305 PRUint32 revision = 0; 306 PRUnichar *versionUtf16 = NULL; 307 PRUnichar *homefolderUtf16 = NULL; 308 308 nsresult rc; /* Result code of various function (method) calls. */ 309 309 … … 353 353 /* 2. Version */ 354 354 355 rc = vbox->vtbl->GetVersion(vbox, &version _);355 rc = vbox->vtbl->GetVersion(vbox, &versionUtf16); 356 356 if (NS_SUCCEEDED(rc)) 357 357 { 358 358 char *version = NULL; 359 VBoxUtf16ToUtf8(version _, &version);359 VBoxUtf16ToUtf8(versionUtf16, &version); 360 360 printf("\tVersion: %s\n", version); 361 361 VBoxUtf8Free(version); 362 VBoxComUnallocMem(versionUtf16); 362 363 } 363 364 else … … 366 367 argv[0], (unsigned)rc); 367 368 } 368 VBoxComUnallocMem(version_);369 369 370 370 /* 3. Home Folder */ 371 371 372 rc = vbox->vtbl->GetHomeFolder(vbox, &homefolder _);372 rc = vbox->vtbl->GetHomeFolder(vbox, &homefolderUtf16); 373 373 if (NS_SUCCEEDED(rc)) 374 374 { 375 375 char *homefolder = NULL; 376 VBoxUtf16ToUtf8(homefolder _, &homefolder);376 VBoxUtf16ToUtf8(homefolderUtf16, &homefolder); 377 377 printf("\tHomeFolder: %s\n", homefolder); 378 378 VBoxUtf8Free(homefolder); 379 VBoxComUnallocMem(homefolderUtf16); 379 380 } 380 381 else … … 383 384 argv[0], (unsigned)rc); 384 385 } 385 VBoxComUnallocMem(homefolder_);386 386 387 387 listVMs(vbox, session);
Note:
See TracChangeset
for help on using the changeset viewer.

