ReactOS 0.4.15-dev-7113-g9ea2222
GetFileInformationByHandleEx.c
Go to the documentation of this file.
1
2#include "k32_vista.h"
3
4#include <ndk/rtlfuncs.h>
5#include <ndk/iofuncs.h>
6
7#define NDEBUG
8#include <debug.h>
9
10#undef FIXME
11#define FIXME DPRINT1
12
13/* Taken from Wine kernel32/file.c */
14
15/***********************************************************************
16 * GetFileInformationByHandleEx (kernelbase.@)
17 */
20{
23
24 switch (class)
25 {
26 case FileRemoteProtocolInfo:
27 case FileStorageInfo:
28 case FileDispositionInfoEx:
29 case FileRenameInfoEx:
30 case FileCaseSensitiveInfo:
31 case FileNormalizedNameInfo:
32 FIXME("%p, %u, %p, %lu\n", handle, class, info, size);
34 return FALSE;
35
36 case FileStreamInfo:
38 break;
39
40 case FileCompressionInfo:
42 break;
43
44 case FileAlignmentInfo:
46 break;
47
48 case FileAttributeTagInfo:
50 break;
51
52 case FileBasicInfo:
54 break;
55
56 case FileStandardInfo:
58 break;
59
60 case FileNameInfo:
62 break;
63
64 case FileIdInfo:
66 break;
67
68 case FileIdBothDirectoryRestartInfo:
69 case FileIdBothDirectoryInfo:
72 (class == FileIdBothDirectoryRestartInfo));
73 break;
74
75 case FileFullDirectoryInfo:
76 case FileFullDirectoryRestartInfo:
79 (class == FileFullDirectoryRestartInfo));
80 break;
81
82 case FileIdExtdDirectoryInfo:
83 case FileIdExtdDirectoryRestartInfo:
86 (class == FileIdExtdDirectoryRestartInfo));
87 break;
88
89 case FileRenameInfo:
90 case FileDispositionInfo:
91 case FileAllocationInfo:
92 case FileIoPriorityHintInfo:
93 case FileEndOfFileInfo:
94 default:
96 return FALSE;
97 }
98
99#ifdef __REACTOS__
100 if (!NT_SUCCESS(status))
101 {
103 return FALSE;
104 }
105
106 return TRUE;
107#else
108 return set_ntstatus(status);
109#endif
110}
BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandleEx(HANDLE handle, FILE_INFO_BY_HANDLE_CLASS class, LPVOID info, DWORD size)
#define DECLSPEC_HOTPATCH
Definition: _mingw.h:243
LONG NTSTATUS
Definition: precomp.h:26
#define FileIdExtdDirectoryInformation
Definition: dirctrl.c:24
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static __inline BOOL set_ntstatus(NTSTATUS status)
Definition: security.c:227
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define FileIdInformation
Definition: fileinfo.c:24
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
@ FileCompressionInformation
Definition: from_kernel.h:89
@ FileAttributeTagInformation
Definition: from_kernel.h:96
@ FileAlignmentInformation
Definition: from_kernel.h:78
@ FileIdBothDirectoryInformation
Definition: from_kernel.h:98
@ FileNameInformation
Definition: from_kernel.h:70
@ FileFullDirectoryInformation
Definition: from_kernel.h:63
@ FileStreamInformation
Definition: from_kernel.h:83
@ FileBasicInformation
Definition: from_kernel.h:65
GLsizeiptr size
Definition: glext.h:5919
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
NTSTATUS NTAPI NtQueryDirectoryFile(IN HANDLE FileHandle, IN HANDLE EventHandle OPTIONAL, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PVOID FileInformation, IN ULONG Length, IN FILE_INFORMATION_CLASS FileInformationClass, IN BOOLEAN ReturnSingleEntry, IN PUNICODE_STRING FileName OPTIONAL, IN BOOLEAN RestartScan)
Definition: iofunc.c:1994
static FILE_INFO_BY_HANDLE_CLASS
Definition: file.c:36
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK io
Definition: file.c:100
NTSYSAPI NTSTATUS NTAPI NtQueryInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, OUT PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
#define FileStandardInformation
Definition: propsheet.cpp:61
Definition: ps.c:97
#define WINAPI
Definition: msvc.h:6