FileSystemApiHookFunction

FileSystemApiHookFunction(
 pIFSFunc FSDFnAddr,
 int FunctionNum,
 int Drive,
 int ResourceFlags,
 int CodePage,
 pioreq pir
 )
 

The hook function is called on every API call that the IFS manager needs to call the FSDs on. The hook function is called with the following parameters:

FSDFnAddr
Supplies the address of the FSD function that is to be called for this API.
FunctionNum
Supplies the function that is being performed. This is usually one of the list of functions described in section 8.5. Exceptions are noted as appropriate. They are as follows:
Function Type Values:  
Value Meaning
IFSFN_READ Read a file.
IFSFN_WRITE Write a file.
IFSFN_FINDNEXT FindNext operation on a handle.
IFSFN_FCNNEXT FindFirstChangeNotifyNext function.
IFSFN_SEEK Seek on a file.
IFSFN_CLOSE Close a file handle.
IFSFN_FINDCLOSE Close a find context handle.
IFSFN_FCNCLOSE Close a find change notify context handle.
IFSFN_COMMIT Commit a file.
IFSFN_FILELOCKS Lock a region of a file.
IFSFN_FILETIMES Get/set time of a file.
IFSFN_PIPEREQUEST Handle-based pipe request. See section 8.6.1
IFSFN_HANDLEINFO Handle information on pipes. See section 8.6.3.
IFSFN_ENUMHANDLE Enumerate information about handle.
IFSFN_CONNECT Connect/mount a resource (net, local or character FSD).
IFSFN_DELETE Delete a file.
IFSFN_DIR Directory-based operations.
IFSFN_FILEATTRIB Get/set attributes of a file.
IFSFN_FLUSH Flush a resource.
IFSFN_GETDISKINFO Get disk free space.
IFSFN_OPEN Open/create a file.
IFSFN_RENAME Rename a file.
IFSFN_SEARCH DOS-style search operation.
IFSFN_QUERY Query information about resource.
IFSFN_DISCONNECT Disconnect/unmount a resource (net, local or character FSD).
IFSFN_UNCPIPEREQ UNC-path based pipe request. See section 8.6.2.
IFSFN_IOCTL16DRIVE IOCtl operation.
IFSFN_GETDISKPARMS Get disk parameters.
IFSFN_FINDOPEN LFN-style FindFirst operation.
IFSFN_DASDIO Direct disk access operations.

Drive
Supplies the 1-based drive the operation is being performed on (-1 if UNC).
ResourceFlags
Supplies the kind of resource the operation is being performed on.
Resource Flags:  
Value Meaning
IFSFH_RES_UNC UNC resource.
IFSFH_RES_NETWORK Network drive.
IFSFH_RES_LOCAL Local drive.
IFSFH_RES_CFSD Character device.

CodePage
Supplies the codepage that the user string was passed in on.
CodePage Values:  
Value Meaning
BCS_WANSI Windows ANSI codepage.
BCS_OEM Currently configured OEM codepage.

pir
Supplies pointer to IOREQ structure. This structure is filled in based on the function being performed as described in section 8.5.