StormLib API Reference

SFileGetFileSize

Description

DWORD WINAPI SFileGetFileSize(
  HANDLE hFile,                     // File handle
  DWORD * pdwFileSizeHigh           // High 32 bits of the file size.
);

Function SFileGetFileSize retrieves the size of an open file.

Parameters

hFile
[in] Handle to an open file. The file handle must have been created by SFileOpenFileEx.
pdwFileSizeHigh
[out] Receives high 32 bits of the a file size. This parameter can be NULL.

Return Value

When the function succeeds, it returns lower 32-bit of the file size. On an error, it returns SFILE_INVALID_SIZE and GetLastError returns an error code.

Remarks

Current implementation of MPQ archives doesn't support files of size greater than 4 GB. Thus, if hFile is a handle to a file open from a MPQ, the variable pointed by pdwFileSizeHigh will always be set to zero.

Availability in Storm.dll

Available in Storm.dll Yes
Ordinal number in Storm.dll 1.00 76 (0x04C)
Ordinal number in Storm.dll 1.09 265 (0x109)