IFSMgr_SetReqHook( unsigned int Request, void * Preamble )
This service has been provided for FSDs to hook interrupt functions that the IFS manager normally does not hook or to override the default handlers that the IFS manager has for hooked interrupt functions. Currently, this interface is supported only on for int 21h calls. An FSD can call and pass in the address of a preamble routine for a given int 21h function. Whenever that int 21h call is issued, the FSD's preamble gets called. The FSD can either accept or reject the int 21h on its preamble. If it accepts it, the FSD is then called for that int 21h via the IFSMgr_NetFunction service, which is described later in this document. Note that for int 21h functions that are already hooked by the IFS manager which the FSD is trying to override, the FSD will not be called via the IFSMgr_NetFunction service if the request is accepted.
Request
Supplies interrupt function to be hooked. High word contains the interrupt level to be hooked; low word contains the function number. Currently, the interrupt level can only be 21h and the function number is the value in register AH.
Preamble
Supplies the address of the preamble function that is to be called when the hooked int 21h function is occurs.
The interface to the preamble function called by the IFS manager on a hooked int 21h request is described below. Preamble functions must chain if they reject a request.
[EBX]
Current VM handle.
[ECX]
Function number (user AH).
[EBP]
Pointer to client register structure.
[ESI]
Provider id ( initialized to ANYPROID )
Request hooked: Carry flag set. | |
[ESI] | Provider id of FSD that is hooking the call. This is optional, the FSD can leave this field unchanged. If a specific provider id is returned, the call will be seen only by that FSD. Otherwise, all FSDs will be able to see the hooked call. |
Request not hooked: The FSD must jump to the address of the previous preamble returned on the call to IFSMgr_SetReqHook with the entry conditions preserved. |
Register Usage If request is hooked, EBX and EBP must be preserved and the other registers can be destroyed. If request is not hooked, all registers must be preserved. |