_SHELL_CallAtAppyTime


include shell.inc
VxDcall _SHELL_CallAtAppyTime, <<OFFSET32 pfnCallback>, 
    dwRefData, dwFlags, dwTimeout>
cmp eax, 0
je  error
mov [EventHandle], eax  ; application time event handle

Installs a callback procedure for an application time event. Uses C calling conventions.

pfnCallback

Address of the callback procedure to be called when the system VM reaches the application time state. For more information about the procedure, see the comments below.

dwRefData

Reference data to pass to the callback procedure.

dwFlags

Event flag. Can be one of these values:

CAAFL_RING0

Ring zero event.

CAAFL_TIMEOUT

Time out the event after the duration specified by dwTimeout.


dwTimeout

Time out duration.

This is an asynchronous service.

The system calls the callback procedure whenever the system VM is in a quiet state. The system calls the procedure using the C calling conventions as follows:


cCall [pfnCallback], <dwRefData, dwFlags>

The dwRefData parameter is the same value passed to the _SHELL_CallAtAppyTime service. No return value is required. The dwFlags parameter is a bitmask of flags describing the conditions under which the callback procedure is made. If the CAAFL_TIMEOUT bit is set, the timeout duration elapsed before application time could be reached, in which case the system is not at application time, and you cannot use application-time-only services. All other bits of dwFlags are reserved.

If application time is not currently available, the event is scheduled for a time when application time is available. If application time never becomes available (for example, if the application time event is scheduled while the system is shutting down), the event is never dispatched.