Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method retrieves the size, in bytes, of the specified file on a Windows Embedded CE–based remote device.

Syntax

DWORD CeGetFileSize( 
  HANDLE 
hFile, 
  LPDWORD 
lpFileSizeHigh 
);

Parameters

hFile

[in] Open handle of the file whose size is being returned. The handle must have been created with either GENERIC_READ or GENERIC_WRITE access to the file.

lpFileSizeHigh

[out] Pointer to the variable where the high-order word of the file size is returned. This parameter can be NULL if the application does not require the high-order word.

Return Value

If the function succeeds, the return value is the low-order DWORDof the file size, and, if lpFileSizeHigh is non-NULL, the function puts the high-order doubleword of the file size into the variable pointed to by that parameter.

If the function fails and lpFileSizeHigh is NULL, the return value is INVALID_FILE_SIZE. To get extended error information, call IRAPISession::CeGetLastErrorand IRAPISession::CeRapiGetError.If the function fails and lpFileSizeHigh is non-NULL, the return value is INVALID_FILE_SIZE and IRAPISession::CeGetLastErrorwill return a value other than NO_ERROR.

Requirements

Header rapi2.h
Library ole32.lib, rapiuuid.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also