FS_EnumerateHandle

FS_EnumerateHandle(
 PIOREQ pir
 )
 

This function handles the Win32 function: GetFileInformationByHandle() and the DOS int 21h function: 440dh, subfunction 086dh. In addition, it also handles certain operations that are needed for volume locking support in the IFS manager.

ir_rh
Supplies handle to disk volume or network resource that contains the file.
ir_sfn
Supplies system file number.
ir_flags
Supplies operation type.
Operation Type Values:  
Value Meaning
ENUMH_GETFILEINFO Get information about the file.
ENUMH_GETFILENAME Get the pathname of the file.
ENUMH_GETFINDINFO Get information about the find handle so that a find can be resumed after a volume lock is released.
ENUMH_RESUMEFIND Resume a find based on the information returned on the ENUMH_GETFINDINFO operation called previously.
ENUMH_RESYNCFILEDIR Resynchronize the directory cluster and position for a file that could have been moved. However, the file's data blocks will not have moved.

ir_fh
Supplies the FSD file handle on the ENUMH_GETFILEINFO, ENUMH_GETFILENAME and the ENUMH_RESYNCFILEDIR operations. Supplies the FSD find handle on the ENUMH_GETFINDINFO and ENUMH_RESUMEFIND operations.
ir_ppath
Supplies the pathname on ENUMH_RESUMEFIND and ENUMH_RESYNCFILEDIR operations. Supplies a pointer to a buffer the pathname is to be returned in on the ENUMH_GETFINDINFO and ENUMH_GETFILENAME operations. This parameter is not valid on the ENUMH_GETFILEINFO operation.
ir_data
Supplies a pointer to the structure filled in on the ENUMH_GETFILEINFO operation. The contents of this structure are described below. This parameter is not valid on other operations.
ir_options
Supplies special options. This field is valid only on the ENUMH_RESYNCFILEDIR operation.
ENUMH_RESYNCFILEDIR Options:  
Value Meaning
RESYNC_INVALIDATEMETACACHE Indicates that any meta-caches associated with this open file should be flushed. This could include file extent caches, name caches, etc.

ir_user
Supplies user ID for this request.
ir_pid
Supplies process ID for this request.
ir_error Contains status of the operation ( 0 if no error, errorcode otherwise ) for all operations.

Operation Type ENUMHGETFILEINFO:  
Value Meaning
ir_data Returns information about the file filled into the BY_HANDLE_FILE_INFORMATION structure described below.

BY_HANDLE_FILE_INFORMATION Structure:  
Value Meaning
bhfi_dwFileAttributes Returns the attributes of the file.
bhfi_ftCreationTime Returns the creation time of the file in the Win32 FileTime structure format described below.

Win32 FileTime Structure:  
Value Meaning
dwLowDateTime Returns the low double word of the time in Win32 format.
dwHighDateTime Returns the high double word of the time in Win32 format.

bhfi_ftLastAccessTime Returns the last access time of the file in the Win32 FileTime structure format described above.
bhfi_ftLastWriteTime Returns the last access time of the file in the Win32 FileTime structure format described above.
bhfi_dwVolumeSerialNumber Returns the serial number of the volume the file is on.
bhfi_nFileSizeHigh Returns the high 32-bits of the file size.
bhfi_nFileSizeLow Returns the low 32-bits of the file size.
bhfi_nNumberOfLinks Returns the number of links to the file.
bhfi_nFileIndexHigh Returns the high 32-bits of a unique index to the file. This index needs to be valid only while the file is open and is typically used to determine if multiple handles point to the same open file.
bhfi_nFileIndexLow Returns the low 32-bits of a unique index to the file.

Operation Type ENUMHGETFILENAME:  
Value Meaning
ir_ppath Returns the pathname to the open file in a unicode canonicalized path format. This path can be passed back to the FSD to open the file.

Operation Type ENUMHGETFINDINFO:  
Value Meaning
ir_ppath Returns the pathname to the last file found on the find handle in a unicode canonicalized path format. This path can be passed back to the FSD to resume the find at this pathname. This is typically done during volume locking.

Details about volume-locking support and about how these volume-locking operations are used to ensure a consistent system while a volume lock is in progress are given in the volume-locking specification. Any local FSD that allows direct disk operations must also support the volume-locking support functions. Note that the ENUMH_RESYNCFILEDIR operation can only be called on files that are left open by the IFS manager across a level 3 volume lock. Typically, memory-mapped files and Win32 executables and DLLs fall into this category of files. However, disk utilities are allowed to move these files even though they are open, with certain restrictions.