Re: GetFileSizeEx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On November 12, 2002 10:45, steve.lustbader@philips.com wrote:
> Changelog:
> Stub for GetFileSizeEx

This is the same patch, except it contains an implementation of GetFileSizeEx 
instead of a stub.

-Ryan

ChangeLog:
Implement GetFileSizeEx (based on a patch by Steve Lustbader)

Index: dlls/kernel/kernel32.spec
===================================================================
RCS file: /home/wine/wine/dlls/kernel/kernel32.spec,v
retrieving revision 1.68
diff -u -r1.68 kernel32.spec
--- dlls/kernel/kernel32.spec	6 Nov 2002 20:03:00 -0000	1.68
+++ dlls/kernel/kernel32.spec	12 Nov 2002 22:54:55 -0000
@@ -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
Index: files/file.c
===================================================================
RCS file: /home/wine/wine/files/file.c,v
retrieving revision 1.168
diff -u -r1.168 file.c
--- files/file.c	8 Nov 2002 18:52:18 -0000	1.168
+++ files/file.c	12 Nov 2002 22:54:56 -0000
@@ -998,6 +998,31 @@
 
 
 /***********************************************************************
+ *           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.@)
  */
 BOOL WINAPI GetFileTime( HANDLE hFile, FILETIME *lpCreationTime,
Index: include/winbase.h
===================================================================
RCS file: /home/wine/wine/include/winbase.h,v
retrieving revision 1.163
diff -u -r1.163 winbase.h
--- include/winbase.h	4 Nov 2002 22:43:24 -0000	1.163
+++ include/winbase.h	12 Nov 2002 22:54:56 -0000
@@ -1304,6 +1304,7 @@
 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*);

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux