Name
Pause
Description
HRESULT
Pause(LONG pauseOptions,
IVixHandle* propertyList,
ICallback* jobDoneCallback,
IJob** pauseJob);
This function pauses a virtual machine. See Remarks section for pause behavior when
used with different operations.
Parameters
- pauseOptions
-
Must be zero.
- propertyList
-
Must be NULL (C++), null (C#), or Nothing (VB).
- jobDoneCallback
-
An ICallback instance that will be called when the
operation is complete.
- pauseJob
-
Returns an IJob object that describes the state of this asynchronous operation.
Return Value
HRESULT
Remarks
- This stops execution of the virtual machine.
- Functions that invoke guest operations should not be called
when the virtual machine is paused.
- Call Unpause to continue execution of the virtual machine.
- Calling Reset, PowerOff, and Suspend will
successfully work when paused. The pause state is not preserved
in a suspended virtual machine; a subsequent PowerOn will
not remember the previous pause state.
- Calling BeginRecording when paused is legal. The actual recording
will start when the virtual machine is unpaused.
- Do not call BeginReplay when the virtual machine is paused.
To do so, call PowerOff first, which will reset the pause state.
After the virtual machine is powered off, you can then call
BeginReplay.
Side Effects
None.
Requirements
VixCOM.h, since VMware Workstation 6.5
Example
VBScript:
Set job = vm.Pause(0, Nothing, Nothing)
' WaitWithoutResults is just like Wait, except it does not get any properties.
err = job.WaitWithoutResults()
QuitIfError(err)
' Do something...
Set job = vm.Unpause(0, Nothing, Nothing)
' WaitWithoutResults is just like Wait, except it does not get any properties.
err = job.WaitWithoutResults()
QuitIfError(err)