IdleCallback


include vmm.inc

mov     ebx, SysVMhandle
mov     edi, SysThreadHandle
mov     ebp, OFFSET32 Client_Reg_Struc
call    [IdleCallback]
jc      pass_to_next

Performs programmer-defined processing whenever the Windows kernel signals that Windows is idle and all other virtual machines are also idle. IdleCallback is a programmer-defined callback function installed by the Call_When_Idle service.

SysVMHandle

Handle of the system virtual machine.

SysThreadHandle

Handle of the system thread.

Client_Reg_Struc

Address of a Client_Reg_Struc structure that contains the registers of the system virtual machine.

The callback function can carry out any operation and can modify EAX, EBX, ECX, EDX, ESI, EDI, and Flags. If the operation takes a significant amount of time, the function should clear the carry flag before returning to prevent other callbacks from being called. Otherwise, the function should set the carry flag and return.

See also Call_When_Not_Critical, Call_When_Task_Switched