Author: akhaldi
Date: Tue Nov 17 10:40:04 2015
New Revision: 69911
URL:
http://svn.reactos.org/svn/reactos?rev=69911&view=rev
Log:
[KERNEL32_VISTA] Import GetFileInformationByHandleEx() from Wine Staging 1.7.55.
CORE-10536
Added:
trunk/reactos/dll/win32/kernel32_vista/GetFileInformationByHandleEx.c (with props)
Modified:
trunk/reactos/dll/win32/kernel32_vista/CMakeLists.txt
trunk/reactos/dll/win32/kernel32_vista/kernel32_vista.spec
Modified: trunk/reactos/dll/win32/kernel32_vista/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32_vista/C…
==============================================================================
--- trunk/reactos/dll/win32/kernel32_vista/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32_vista/CMakeLists.txt [iso-8859-1] Tue Nov 17 10:40:04
2015
@@ -7,6 +7,7 @@
list(APPEND SOURCE
DllMain.c
+ GetFileInformationByHandleEx.c
GetTickCount64.c
InitOnceExecuteOnce.c
${CMAKE_CURRENT_BINARY_DIR}/kernel32_vista.def)
Added: trunk/reactos/dll/win32/kernel32_vista/GetFileInformationByHandleEx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32_vista/G…
==============================================================================
--- trunk/reactos/dll/win32/kernel32_vista/GetFileInformationByHandleEx.c (added)
+++ trunk/reactos/dll/win32/kernel32_vista/GetFileInformationByHandleEx.c [iso-8859-1] Tue
Nov 17 10:40:04 2015
@@ -0,0 +1,70 @@
+
+#include "k32_vista.h"
+
+#include <ndk/rtlfuncs.h>
+#include <ndk/iofuncs.h>
+
+/* Taken from Wine kernel32/file.c */
+
+/***********************************************************************
+* GetFileInformationByHandleEx (KERNEL32.@)
+*/
+BOOL WINAPI GetFileInformationByHandleEx( HANDLE handle, FILE_INFO_BY_HANDLE_CLASS
class,
+ LPVOID info, DWORD size )
+{
+ NTSTATUS status;
+ IO_STATUS_BLOCK io;
+
+ switch (class)
+ {
+ case FileStreamInfo:
+ case FileCompressionInfo:
+ case FileAttributeTagInfo:
+ case FileRemoteProtocolInfo:
+ case FileFullDirectoryInfo:
+ case FileFullDirectoryRestartInfo:
+ case FileStorageInfo:
+ case FileAlignmentInfo:
+ case FileIdInfo:
+ case FileIdExtdDirectoryInfo:
+ case FileIdExtdDirectoryRestartInfo:
+ //FIXME( "%p, %u, %p, %u\n", handle, class, info, size );
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
+
+ case FileBasicInfo:
+ status = NtQueryInformationFile( handle, &io, info, size,
FileBasicInformation );
+ break;
+
+ case FileStandardInfo:
+ status = NtQueryInformationFile( handle, &io, info, size,
FileStandardInformation );
+ break;
+
+ case FileNameInfo:
+ status = NtQueryInformationFile( handle, &io, info, size, FileNameInformation
);
+ break;
+
+ case FileIdBothDirectoryRestartInfo:
+ case FileIdBothDirectoryInfo:
+ status = NtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, info, size,
+ FileIdBothDirectoryInformation, FALSE, NULL,
+ (class == FileIdBothDirectoryRestartInfo) );
+ break;
+
+ case FileRenameInfo:
+ case FileDispositionInfo:
+ case FileAllocationInfo:
+ case FileIoPriorityHintInfo:
+ case FileEndOfFileInfo:
+ default:
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return FALSE;
+ }
+
+ if (status != STATUS_SUCCESS)
+ {
+ SetLastError( RtlNtStatusToDosError( status ) );
+ return FALSE;
+ }
+ return TRUE;
+}
Propchange: trunk/reactos/dll/win32/kernel32_vista/GetFileInformationByHandleEx.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/kernel32_vista/kernel32_vista.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32_vista/k…
==============================================================================
--- trunk/reactos/dll/win32/kernel32_vista/kernel32_vista.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32_vista/kernel32_vista.spec [iso-8859-1] Tue Nov 17
10:40:04 2015
@@ -1,3 +1,4 @@
+@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)
+@ stdcall GetFileInformationByHandleEx(long long ptr long)
@ stdcall -ret64 GetTickCount64()
-@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)