Changeset 3422 in vbox
- Timestamp:
- Jul 4, 2007 4:07:49 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/testcase/tstAPI.cpp
r3387 r3422 523 523 { 524 524 ComPtr <IMachine> machine; 525 Bstr name = "Windows XP";525 Bstr name = argc > 1 ? argv [1] : "dos"; 526 526 printf ("Getting a machine object named '%ls'...\n", name.raw()); 527 527 CHECK_ERROR_BREAK (virtualBox, FindMachine (name, machine.asOutParam())); 528 // printf ("Accessing the machine in read-only mode:\n"); 529 // readAndChangeMachineSettings (machine); 530 // if (argc != 2) 531 // { 532 // printf("Error: a string has to be supplied!\n"); 533 // } 534 // else 535 // { 536 // Bstr secureLabel = argv[1]; 537 // machine->COMSETTER(ExtraData)(L"VBoxSDL/SecureLabel", secureLabel); 538 // } 539 } 540 while (FALSE); 528 printf ("Accessing the machine in read-only mode:\n"); 529 readAndChangeMachineSettings (machine); 530 #if 0 531 if (argc != 2) 532 { 533 printf ("Error: a string has to be supplied!\n"); 534 } 535 else 536 { 537 Bstr secureLabel = argv[1]; 538 machine->COMSETTER(ExtraData)(L"VBoxSDL/SecureLabel", secureLabel); 539 } 540 #endif 541 } 542 while (0); 541 543 printf ("\n"); 542 544 #endif … … 709 711 { 710 712 ComPtr <IMachine> machine; 711 Bstr name = L"dos";713 Bstr name = argc > 1 ? argv [1] : "dos"; 712 714 printf ("Getting a machine object named '%ls'...\n", name.raw()); 713 715 CHECK_ERROR_BREAK (virtualBox, FindMachine (name, machine.asOutParam())); … … 722 724 printf ("Accessing the machine within the session:\n"); 723 725 readAndChangeMachineSettings (sessionMachine, machine); 726 #if 0 727 printf ("\n"); 728 printf ("Enabling the VRDP server (must succeed even if the VM is saved):\n"); 729 ComPtr <IVRDPServer> vrdp; 730 CHECK_ERROR_BREAK (sessionMachine, COMGETTER(VRDPServer) (vrdp.asOutParam())); 731 if (FAILED (vrdp->COMSETTER(Enabled) (TRUE))) 732 { 733 PRINT_ERROR_INFO (com::ErrorInfo (vrdp)); 734 } 735 else 736 { 737 BOOL enabled = FALSE; 738 CHECK_ERROR_BREAK (vrdp, COMGETTER(Enabled) (&enabled)); 739 printf ("VRDP server is %s\n", enabled ? "enabled" : "disabled"); 740 } 741 #endif 724 742 #endif 725 743 #if 0
Note:
See TracChangeset
for help on using the changeset viewer.