typedef struct FILE_INFO {
DWORD dwCategory;
SECURITY_ATTRIBUTES SecAttr;
HANDLE hFile;
BY_HANDLE_FILE_INFORMATION Fileinfo;
PROG_FILE_PATH_DESC pPathDesc;
PWSTR pszFileName;
PFILETIME pFiletime;
}FILE_INFO, * PFILE_INFO;
Encapsulates a file handle with comprehensive metadata, security context, and path information.
This structure maintains a complete record of an open file, including the file handle, system metadata,
custom timestamps, security attributes, and path information. It serves as the primary container for
file operations throughout the mdts_io library.
CreateFile().INVALID_HANDLE_VALUE when deallocated.BY_HANDLE_FILE_INFORMATION structure populated by GetFileInformationByHandle().PROG_FILE_PATH_DESC pointer holding the file path as a UNICODE_STRING.FreeFileInfo().PathFindFileNameW() for quick access.usFileNameOffset and GET_FILEINFO_FILENAME() instead.FILETIME pointer for a custom timestamp associated with the file.NULL if no custom time is set.FreeFileInfo().NewFileInfo().FreeFileInfo() to release hFile, pPathDesc.pFilePath, and pFiletime.hFile does not affect pPathDesc or pFiletime; they are independent allocations.IsValidFileInfo() checks handle validity, path consistency, and file existence.pPathDesc, pszFileName, pFiletime) are owned by FILE_INFO and must not be freed independently.FreeFileInfo() to release the entire structure.pszFileName is transitional and deprecated use GET_FILEINFO_FILENAME() or usFileNameOffset.BY_HANDLE_FILE_INFORMATION snapshot is static; file size or attributes may change on disk after creation without affecting the structure.