Implemented GetFileSizeEx (based on a patch by Steve Lustbader).

This commit is contained in:
Ryan Cumming 2002-11-15 04:12:10 +00:00 committed by Alexandre Julliard
parent 15e8e0a2f1
commit 4cda16e03b
3 changed files with 27 additions and 0 deletions

View File

@ -366,6 +366,7 @@
@ stdcall GetFileAttributesW(wstr) GetFileAttributesW
@ stdcall GetFileInformationByHandle(long ptr) GetFileInformationByHandle
@ stdcall GetFileSize(long ptr) GetFileSize
@ stdcall GetFileSizeEx(long ptr) GetFileSizeEx
@ stdcall GetFileTime(long ptr ptr ptr) GetFileTime
@ stdcall GetFileType(long) GetFileType
@ stdcall GetFullPathNameA(str long ptr ptr) GetFullPathNameA

View File

@ -997,6 +997,31 @@ DWORD WINAPI GetFileSize( HANDLE hFile, LPDWORD filesizehigh )
}
/***********************************************************************
* GetFileSizeEx (KERNEL32.@)
*/
BOOL WINAPI GetFileSizeEx( HANDLE hFile, PLARGE_INTEGER lpFileSize )
{
BY_HANDLE_FILE_INFORMATION info;
if (!lpFileSize)
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
if (!GetFileInformationByHandle( hFile, &info ))
{
return FALSE;
}
lpFileSize->s.LowPart = info.nFileSizeLow;
lpFileSize->s.HighPart = info.nFileSizeHigh;
return TRUE;
}
/***********************************************************************
* GetFileTime (KERNEL32.@)
*/

View File

@ -1304,6 +1304,7 @@ BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRI
BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
#define GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
DWORD WINAPI GetFileSize(HANDLE,LPDWORD);
BOOL WINAPI GetFileSizeEx(HANDLE,PLARGE_INTEGER);
BOOL WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME);
DWORD WINAPI GetFileType(HANDLE);
DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);