Changeset 16513 in vbox for trunk/src/VBox/Main/cbinding
- Timestamp:
- Feb 4, 2009 2:03:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/cbinding/VBoxXPCOMC.cpp
r16497 r16513 28 28 29 29 #include <iprt/string.h> 30 #include <iprt/log.h> 30 31 31 32 #include "VirtualBox_XPCOM.h" … … 88 89 * add a flag argument and define VBOXCOMINIT_FLAG_VERBOSE for the purpose. */ 89 90 90 // All numbers on stderr in hex prefixed with 0X.91 cerr.setf(ios_base::showbase | ios_base::uppercase);92 cerr.setf(ios_base::hex, ios_base::basefield);93 94 91 rc = NS_InitXPCOM2(&serviceManager, nsnull, nsnull); 95 92 if (NS_FAILED(rc)) 96 93 { 97 cerr << "XPCOM could not be initialized! rc=" << rc << endl;94 Log(("Cbinding: XPCOM could not be initialized! rc=0x%x\n",rc)); 98 95 VBoxComUninitialize(); 99 96 return; … … 103 100 if (NS_FAILED(rc)) 104 101 { 105 cerr << "could not get component manager! rc=" << rc << endl;102 Log(("Cbinding: Could not get component manager! rc=0x%x\n",rc)); 106 103 VBoxComUninitialize(); 107 104 return; … … 114 111 if (NS_FAILED(rc)) 115 112 { 116 cerr << "could not instantiate VirtualBox object! rc=" << rc << endl;113 Log(("Cbinding: Could not instantiate VirtualBox object! rc=0x%x\n",rc)); 117 114 VBoxComUninitialize(); 118 115 return; 119 116 } 120 117 121 cout << "VirtualBox object created." << endl;118 Log(("Cbinding: IVirtualBox object created.\n")); 122 119 123 120 rc = manager->CreateInstanceByContractID (NS_SESSION_CONTRACTID, … … 127 124 if (NS_FAILED(rc)) 128 125 { 129 cerr << "could not instantiate Session object! rc=" << rc << endl;126 Log(("Cbinding: Could not instantiate Session object! rc=0x%x\n",rc)); 130 127 VBoxComUninitialize(); 131 128 return; 132 129 } 133 130 134 cout << "ISession object created." << endl;131 Log(("Cbinding: ISession object created.\n")); 135 132 } 136 133 … … 147 144 NS_RELEASE(serviceManager); // decrement refcount 148 145 NS_ShutdownXPCOM(nsnull); 149 cout << "Done!" << endl;146 Log(("Cbinding: Cleaned up the created IVirtualBox and ISession Objects.\n")); 150 147 } 151 148 152 149 /* vim: set ts=4 sw=4 et: */ 153
Note:
See TracChangeset
for help on using the changeset viewer.