Home |
Function RTFGetFileInfoEx |
Function RTFGetFileInfoExRTFGetFileInfoEx returns information about an open file: int RTFGetFileInfoEx(RTFHANDLE File, RTFFileInfoEx * FileInfo, DWORD Flags); ParametersFileReferences the open file for which information is requested. FileInfoMust point to a structure RTFFileInfoEx, declared in Rtfiles.h: typedef union _ULARGE_INTEGER { struct { DWORD LowPart; DWORD HighPart; } u; unsigned __int64 QuadPart; } ULARGE_INTEGER; typedef struct { const RTFDOSDirEntry * DirEntry; DWORD ClusterChains; // only with RTF_FI_CLUSTER_CHAINS ULARGE_INTEGER FileSize; ULARGE_INTEGER FilePos; ULARGE_INTEGER AllocatedSize; // only with RTF_FI_ALLOC_SIZE DWORD VolumeSerialNumber; const char * FullName; } RTFFileInfoEx; FlagsZero or a combination of the flags listed below. If none of these flags is given, RTFFileInfoEx fields AllocatedSize and ClusterChains will be undefined, but the function may need significantly less time.
return valueIf the function succeeds, the return value is RTF_NO_ERROR. If the function fails, the return value is a negative error code. When the function returns RTF_NO_ERROR, the structure is filled with the following information. DirEntry points to the file's directory entry: typedef struct { // 32 bits UINT Second2:5; // seconds divided by 2 (0..29) UINT Minute:6; // 0..59 UINT Hour:5; // 0..23 UINT Day:5; // 1..31 UINT Month:4; // 1..12 UINT Year1980:7; // Years since 1980 } RTFDOSDateTime; typedef struct { // 32 bytes char FileName[8]; // FAT-12/16/32 only char Extension[3]; // ditto BYTE Attributes; BYTE NTReserved; BYTE CreateTimeTenthSecond; // 0..199 RTFDOSDateTime CreateDateTime; WORD LastAccessDate; // not used WORD FirstClusterHi; // FAT-32, exFAT, and ISO 9660 only RTFDOSDateTime DateTime; // of last modification WORD FirstCluster; DWORD FileSize; // low 32 bits of file size } RTFDOSDirEntry; The structure is filled with the following data:
Please note that on exFAT and ISO 9660 volumes, no file name is stored in FileInfo->DirEntry.
|