[PATCH] kernel32: Implement FileNameInfo in GetFileInformationByHandleEx.

Christian Costa titan.costa at gmail.com
Sun Oct 14 10:27:57 CDT 2012


Fixes bug 31794.
---
 dlls/kernel32/file.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index 41abe49..43818b0 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -876,7 +876,6 @@ BOOL WINAPI GetFileInformationByHandleEx( HANDLE handle, FILE_INFO_BY_HANDLE_CLA
     {
     case FileBasicInfo:
     case FileStandardInfo:
-    case FileNameInfo:
     case FileRenameInfo:
     case FileDispositionInfo:
     case FileAllocationInfo:
@@ -897,6 +896,15 @@ BOOL WINAPI GetFileInformationByHandleEx( HANDLE handle, FILE_INFO_BY_HANDLE_CLA
         SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
         return FALSE;
 
+    case FileNameInfo:
+        status = NtQueryInformationFile( handle, &io, info, size, FileNameInformation );
+        if (status != STATUS_SUCCESS)
+        {
+            SetLastError( RtlNtStatusToDosError( status ) );
+            return FALSE;
+        }
+        return TRUE;
+
     case FileIdBothDirectoryRestartInfo:
     case FileIdBothDirectoryInfo:
         status = NtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, info, size,




More information about the wine-patches mailing list