Share via


IRAPISession::CeGetFileSize

Send Feedback

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

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 Values

If the function succeeds, the return value is the low-order DWORD of 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::CeGetLastError and IRAPISession::CeRapiGetError.If the function fails and lpFileSizeHigh is non-NULL, the return value is INVALID_FILE_SIZE and IRAPISession::CeGetLastError will return a value other than NO_ERROR.

Requirements

OS Versions: Windows CE 5.01 and later.
Header: Rapi2.h.
Link Library: Ole32.lib, Rapiuuid.lib

See Also

IRAPISession::IUnknown | IRAPISession::CeGetFileAttributes

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.