Changeset 19242 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 28, 2009 2:10:45 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r19239 r19242 6912 6912 if (SUCCEEDED (rc)) 6913 6913 { 6914 HRESULT result= S_OK;6915 rc = task->mServerProgress->COMGETTER(ResultCode) (& result);6914 LONG iRc = S_OK; 6915 rc = task->mServerProgress->COMGETTER(ResultCode) (&iRc); 6916 6916 if (SUCCEEDED (rc)) 6917 rc = result;6917 rc = iRc; 6918 6918 } 6919 6919 } -
trunk/src/VBox/Main/FloppyDriveImpl.cpp
r19239 r19242 256 256 STDMETHODIMP FloppyDrive::MountImage (IN_BSTR aImageId) 257 257 { 258 Guid imageId = aImageId;258 Guid imageId(aImageId); 259 259 CheckComArgExpr(aImageId, !imageId.isEmpty()); 260 260 -
trunk/src/VBox/Main/HostPower.cpp
r15454 r19242 136 136 137 137 /* Wait until the operation has been completed. */ 138 LONG iRc; 138 139 rc = progress->WaitForCompletion(-1); 139 140 if (SUCCEEDED (rc)) 140 progress->COMGETTER(ResultCode) (&rc); 141 progress->COMGETTER(ResultCode) (&iRc); 142 rc = iRc; 141 143 142 144 AssertMsg (SUCCEEDED (rc), ("SaveState WaitForCompletion " -
trunk/src/VBox/Main/ProgressImpl.cpp
r19239 r19242 372 372 } 373 373 374 STDMETHODIMP ProgressBase::COMGETTER(ResultCode) ( HRESULT*aResultCode)374 STDMETHODIMP ProgressBase::COMGETTER(ResultCode) (LONG *aResultCode) 375 375 { 376 376 CheckComArgOutPointerValid(aResultCode); … … 492 492 AssertReturn (aProgress != NULL, E_INVALIDARG); 493 493 494 HRESULT resultCode;495 HRESULT rc = aProgress->COMGETTER(ResultCode) (& resultCode);494 LONG iRc; 495 HRESULT rc = aProgress->COMGETTER(ResultCode) (&iRc); 496 496 AssertComRCReturnRC (rc); 497 HRESULT resultCode = iRc; 497 498 498 499 if (resultCode == S_OK) … … 1315 1316 } 1316 1317 1317 STDMETHODIMP CombinedProgress::COMGETTER(ResultCode) ( HRESULT*aResultCode)1318 STDMETHODIMP CombinedProgress::COMGETTER(ResultCode) (LONG *aResultCode) 1318 1319 { 1319 1320 CheckComArgOutPointerValid(aResultCode); … … 1592 1593 return rc; 1593 1594 1594 rc = progress->COMGETTER(ResultCode) (&mResultCode); 1595 LONG iRc; 1596 rc = progress->COMGETTER(ResultCode) (&iRc); 1595 1597 if (FAILED (rc)) 1596 1598 return rc; 1599 mResultCode = iRc; 1597 1600 1598 1601 if (FAILED (mResultCode)) -
trunk/src/VBox/Main/generic/NetIf-generic.cpp
r19235 r19242 218 218 Bstr ifname; 219 219 ComPtr <IHostNetworkInterface> iface; 220 if (FAILED (host->FindHostNetworkInterfaceById ( aId, iface.asOutParam())))220 if (FAILED (host->FindHostNetworkInterfaceById (Guid(aId).toUtf16(), iface.asOutParam()))) 221 221 return VERR_INVALID_PARAMETER; 222 222 iface->COMGETTER (Name) (ifname.asOutParam()); -
trunk/src/VBox/Main/include/ProgressImpl.h
r19239 r19242 76 76 STDMETHOD(COMGETTER(Completed)) (BOOL *aCompleted); 77 77 STDMETHOD(COMGETTER(Canceled)) (BOOL *aCanceled); 78 STDMETHOD(COMGETTER(ResultCode)) ( HRESULT*aResultCode);78 STDMETHOD(COMGETTER(ResultCode)) (LONG *aResultCode); 79 79 STDMETHOD(COMGETTER(ErrorInfo)) (IVirtualBoxErrorInfo **aErrorInfo); 80 80 STDMETHOD(COMGETTER(OperationCount)) (ULONG *aOperationCount); … … 396 396 STDMETHOD(COMGETTER(Completed)) (BOOL *aCompleted); 397 397 STDMETHOD(COMGETTER(Canceled)) (BOOL *aCanceled); 398 STDMETHOD(COMGETTER(ResultCode)) ( HRESULT*aResultCode);398 STDMETHOD(COMGETTER(ResultCode)) (LONG *aResultCode); 399 399 STDMETHOD(COMGETTER(ErrorInfo)) (IVirtualBoxErrorInfo **aErrorInfo); 400 400 STDMETHOD(COMGETTER(Operation)) (ULONG *aCount); -
trunk/src/VBox/Main/testcase/tstVBoxAPILinux.cpp
r17970 r19242 143 143 } 144 144 145 ns ID *iid = nsnull;146 machine->GetId( &iid);147 const char *uuidString = nsIDToString(iid);145 nsXPIDLString iid; 146 machine->GetId(getter_Copies(iid)); 147 const char *uuidString = ToNewCString(iid); 148 148 printf("\tUUID: %s\n", uuidString); 149 149 free((void*)uuidString); 150 nsMemory::Free(iid);151 150 152 151 if (isAccessible) … … 194 193 * in the configuration until we explicitely choose to do so. 195 194 */ 196 nsID VMuuid = {0};197 195 nsCOMPtr <IMachine> machine; 198 196 rc = virtualBox->CreateMachine(NS_LITERAL_STRING("A brand new name").get(), 199 nsnull, nsnull, VMuuid, getter_AddRefs(machine));197 nsnull, nsnull, nsnull, getter_AddRefs(machine)); 200 198 if (NS_FAILED(rc)) 201 199 { … … 272 270 } 273 271 274 nsID *machineUUID = nsnull; 275 machine->GetId(&machineUUID); 276 rc = virtualBox->OpenSession(session, *machineUUID); 277 nsMemory::Free(machineUUID); 272 nsXPIDLString machineUUID; 273 machine->GetId(getter_Copies(machineUUID)); 274 rc = virtualBox->OpenSession(session, machineUUID); 278 275 if (NS_FAILED(rc)) 279 276 { … … 329 326 */ 330 327 rc = progress->WaitForCompletion(-1); 331 nsresultresultCode;328 PRInt32 resultCode; 332 329 progress->GetResultCode(&resultCode); 333 330 if (NS_FAILED(rc) || NS_FAILED(resultCode)) … … 343 340 * when we've created the image. 344 341 */ 345 ns ID *vdiUUID = nsnull;346 hardDisk->GetId( &vdiUUID);347 rc = machine->AttachHardDisk( *vdiUUID,342 nsXPIDLString vdiUUID; 343 hardDisk->GetId(getter_Copies(vdiUUID)); 344 rc = machine->AttachHardDisk(vdiUUID, 348 345 NS_LITERAL_STRING("IDE").get(), // controler identifier 349 346 0, // channel number on the controller 350 347 0); // device number on the controller 351 nsMemory::Free(vdiUUID);352 348 if (NS_FAILED(rc)) 353 349 { … … 364 360 * as the boot device. 365 361 */ 366 nsID uuid = {0};367 362 nsCOMPtr<IDVDImage> dvdImage; 368 363 369 364 rc = virtualBox->OpenDVDImage(NS_LITERAL_STRING("/home/achimha/isoimages/winnt4ger.iso").get(), 370 uuid, /* NULL UUID, i.e. a new one will be created */365 nsnull, /* NULL UUID, i.e. a new one will be created */ 371 366 getter_AddRefs(dvdImage)); 372 367 if (NS_FAILED(rc)) … … 379 374 * Now assign it to our VM 380 375 */ 381 ns ID *isoUUID = nsnull;382 dvdImage->GetId( &isoUUID);376 nsXPIDLString isoUUID; 377 dvdImage->GetId(getter_Copies(isoUUID)); 383 378 nsCOMPtr<IDVDDrive> dvdDrive; 384 379 machine->GetDVDDrive(getter_AddRefs(dvdDrive)); 385 rc = dvdDrive->MountImage(*isoUUID); 386 nsMemory::Free(isoUUID); 380 rc = dvdDrive->MountImage(isoUUID); 387 381 if (NS_FAILED(rc)) 388 382 {
Note:
See TracChangeset
for help on using the changeset viewer.