Qian Hong : ntdll: Implemented FileNetworkOpenInformation class support in NtQueryInformationFile.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 10 10:10:03 CDT 2015
Module: wine
Branch: master
Commit: 2a098ab8a8b500362237943770f81c3f063d2dcf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a098ab8a8b500362237943770f81c3f063d2dcf
Author: Qian Hong <qhong at codeweavers.com>
Date: Tue Mar 10 05:17:08 2015 +0800
ntdll: Implemented FileNetworkOpenInformation class support in NtQueryInformationFile.
---
dlls/ntdll/file.c | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index b07e5f9..3bd2c31 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2190,7 +2190,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
0, /* FileMoveClusterInformation */
0, /* FileQuotaInformation */
0, /* FileReparsePointInformation */
- 0, /* FileNetworkOpenInformation */
+ sizeof(FILE_NETWORK_OPEN_INFORMATION), /* FileNetworkOpenInformation */
0, /* FileAttributeTagInformation */
0, /* FileTrackingInformation */
0, /* FileIdBothDirectoryInformation */
@@ -2414,6 +2414,40 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
}
}
break;
+ case FileNetworkOpenInformation:
+ {
+ FILE_NETWORK_OPEN_INFORMATION *info = ptr;
+ ANSI_STRING unix_name;
+
+ if (!(io->u.Status = server_get_unix_name( hFile, &unix_name )))
+ {
+ ULONG attributes;
+ struct stat st;
+
+ if (get_file_info( unix_name.Buffer, &st, &attributes ) == -1)
+ io->u.Status = FILE_GetNtStatus();
+ else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
+ io->u.Status = STATUS_INVALID_INFO_CLASS;
+ else
+ {
+ FILE_BASIC_INFORMATION basic;
+ FILE_STANDARD_INFORMATION std;
+
+ fill_file_info( &st, attributes, &basic, FileBasicInformation );
+ fill_file_info( &st, attributes, &std, FileStandardInformation );
+
+ info->CreationTime = basic.CreationTime;
+ info->LastAccessTime = basic.LastAccessTime;
+ info->LastWriteTime = basic.LastWriteTime;
+ info->ChangeTime = basic.ChangeTime;
+ info->AllocationSize = std.AllocationSize;
+ info->EndOfFile = std.EndOfFile;
+ info->FileAttributes = basic.FileAttributes;
+ }
+ RtlFreeAnsiString( &unix_name );
+ }
+ }
+ break;
default:
FIXME("Unsupported class (%d)\n", class);
io->u.Status = STATUS_NOT_IMPLEMENTED;
More information about the wine-cvs
mailing list