[vbox-dev] savestate operation and IProgress

Ian Chapman packages at amiga-hardware.com
Tue Nov 2 04:55:15 PDT 2010


I'm using VB 3.2.10 on Linux via the SOAP interface. Is there something 
intrinsically different about monitoring the completion of an operation 
using an IProgress object returned from IConsole::saveState() as opposed 
to any other method?

I'm finding that if I use IProgress::getPercent on this object, when it 
reaches 100 (ie its supposed to be complete), getting the return code 
using IProgress::getResultCode results in an error saying that there is 
no returncode because the operation has not completed. The SDK states 
that 100 will only ever be returned when the operation is complete.

Alternatively, if I use IProgress_getCompleted instead and wait until it 
returns true, when using IProgress::getResultCode, I get the error that 
the IProgress reference is (no longer) a managed object.

The same code seems to work without issue on IProgress objects returned 
from IMedium::createBaseStorage, IVirtualBox::openRemoteSession etc.

FWIW, the ISession object seems to get closed without me explicitly 
closing it in my code.

Ian Chapman.

More information about the vbox-dev mailing list