System_Exit


include vmm.inc

mov     ebx, SysVMHandle
mov     eax, System_Exit
VMMcall System_Control

Notifies the virtual device that the system is terminating, either normally or as a result of a crash. Interrupts remain enabled while virtual devices process this message. The virtual device may modify all general registers and flags.

SysVMHandle

Handle of the system virtual machine.

The virtual device must not call the Simulate_Int or Exec_Int service, but the virtual device may modify the system virtual machine memory to restore the system state to allow Windows to exit without complication.

The system restores the instance snapshot before sending this message.

The virtual device may not access pageable data during the processing of the System_Exit message because the swap file may be in a bad state (which is why the system is crashing in the first place), or the swap file may already have been closed. Virtual devices which wish to access pageable data during System_Exit must lock the data during Sys_VM_Terminate. During a system crash, the Sys_VM_Terminate message is not sent, so the virtual device should have some way of determining during System_Exit whether or not it was able to lock its data; if not, it should skip any procedures which use the pageable data.

See also Sys_Critical_Exit, Sys_VM_Terminate, System_Exit2