GetCompressedFileSizeA function
LPCSTR lpFileName,
LPDWORD lpFileSizeHigh
);
Retrieves the compressed size of a file.
Syntax
LPCSTR lpFileName,
LPDWORD lpFileSizeHigh
);
Parameters
| Parameter | Type | Description |
|---|---|---|
lpFileName |
LPCSTR |
The name of the file. This parameter can be a device name. |
lpFileSizeHigh |
LPDWORD |
A pointer to a DWORD value that receives the high-order 32 bits of the compressed file size.
This parameter can be NULL.
|
Return value
If the function succeeds, the return value is the low-order 32 bits of the compressed file size.
If the function fails, the return value is INVALID_FILE_SIZE. To get extended error information, call GetLastError.
Remarks
The compressed size of a file is the actual size of the file on disk. The uncompressed size is the size of the file as it would be if it were not compressed.
This function returns the compressed size in bytes. If the file is larger than 4GB, the high-order 32 bits are returned in the location pointed to by lpFileSizeHigh.
If you need to get the uncompressed size of a file, use the GetCompressedFileSizeW function.
Requirements
| Attribute | Details |
|---|---|
| Minimum supported client | Windows XP |
| Minimum supported server | Windows Server 2003 |
| Target Platform | Windows |
| Header | fileapi.h (include windows.h) |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |
| Unicode and ANSI versions |
GetCompressedFileSizeA (ANSI) and GetCompressedFileSizeW (Unicode)
|