1
+ /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
2
+ *
3
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ * of this software and associated documentation files (the "Software"), to
5
+ * deal in the Software without restriction, including without limitation the
6
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ * sell copies of the Software, and to permit persons to whom the Software is
8
+ * furnished to do so, subject to the following conditions:
9
+ *
10
+ * The above copyright notice and this permission notice shall be included in
11
+ * all copies or substantial portions of the Software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
+ * IN THE SOFTWARE.
20
+ */
21
+
22
+ #ifndef UV_WIN_NTDLL_H_
23
+ #define UV_WIN_NTDLL_H_
24
+
25
+ #include <windows.h>
26
+
27
+
28
+ #ifndef _NTDEF_
29
+ typedef LONG NTSTATUS ;
30
+ typedef NTSTATUS * PNTSTATUS ;
31
+ #endif
32
+
33
+
34
+ #define STATUS_SUCCESS ((NTSTATUS)0x0)
35
+
36
+
37
+ typedef struct _IO_STATUS_BLOCK {
38
+ union {
39
+ NTSTATUS Status ;
40
+ PVOID Pointer ;
41
+ } DUMMYUNIONNAME ;
42
+ ULONG_PTR Information ;
43
+ } IO_STATUS_BLOCK , * PIO_STATUS_BLOCK ;
44
+
45
+
46
+ typedef struct _FILE_PIPE_LOCAL_INFORMATION {
47
+ ULONG NamedPipeType ;
48
+ ULONG NamedPipeConfiguration ;
49
+ ULONG MaximumInstances ;
50
+ ULONG CurrentInstances ;
51
+ ULONG InboundQuota ;
52
+ ULONG ReadDataAvailable ;
53
+ ULONG OutboundQuota ;
54
+ ULONG WriteQuotaAvailable ;
55
+ ULONG NamedPipeState ;
56
+ ULONG NamedPipeEnd ;
57
+ } FILE_PIPE_LOCAL_INFORMATION , * PFILE_PIPE_LOCAL_INFORMATION ;
58
+
59
+
60
+ typedef enum _FILE_INFORMATION_CLASS {
61
+ FileDirectoryInformation = 1 ,
62
+ FileFullDirectoryInformation ,
63
+ FileBothDirectoryInformation ,
64
+ FileBasicInformation ,
65
+ FileStandardInformation ,
66
+ FileInternalInformation ,
67
+ FileEaInformation ,
68
+ FileAccessInformation ,
69
+ FileNameInformation ,
70
+ FileRenameInformation ,
71
+ FileLinkInformation ,
72
+ FileNamesInformation ,
73
+ FileDispositionInformation ,
74
+ FilePositionInformation ,
75
+ FileFullEaInformation ,
76
+ FileModeInformation ,
77
+ FileAlignmentInformation ,
78
+ FileAllInformation ,
79
+ FileAllocationInformation ,
80
+ FileEndOfFileInformation ,
81
+ FileAlternateNameInformation ,
82
+ FileStreamInformation ,
83
+ FilePipeInformation ,
84
+ FilePipeLocalInformation ,
85
+ FilePipeRemoteInformation ,
86
+ FileMailslotQueryInformation ,
87
+ FileMailslotSetInformation ,
88
+ FileCompressionInformation ,
89
+ FileObjectIdInformation ,
90
+ FileCompletionInformation ,
91
+ FileMoveClusterInformation ,
92
+ FileQuotaInformation ,
93
+ FileReparsePointInformation ,
94
+ FileNetworkOpenInformation ,
95
+ FileAttributeTagInformation ,
96
+ FileTrackingInformation ,
97
+ FileIdBothDirectoryInformation ,
98
+ FileIdFullDirectoryInformation ,
99
+ FileValidDataLengthInformation ,
100
+ FileShortNameInformation ,
101
+ FileIoCompletionNotificationInformation ,
102
+ FileIoStatusBlockRangeInformation ,
103
+ FileIoPriorityHintInformation ,
104
+ FileSfioReserveInformation ,
105
+ FileSfioVolumeInformation ,
106
+ FileHardLinkInformation ,
107
+ FileProcessIdsUsingFileInformation ,
108
+ FileNormalizedNameInformation ,
109
+ FileNetworkPhysicalNameInformation ,
110
+ FileIdGlobalTxDirectoryInformation ,
111
+ FileIsRemoteDeviceInformation ,
112
+ FileAttributeCacheInformation ,
113
+ FileNumaNodeInformation ,
114
+ FileStandardLinkInformation ,
115
+ FileRemoteProtocolInformation ,
116
+ FileMaximumInformation
117
+ } FILE_INFORMATION_CLASS , * PFILE_INFORMATION_CLASS ;
118
+
119
+
120
+ typedef ULONG (NTAPI * sRtlNtStatusToDosError )
121
+ (NTSTATUS Status );
122
+
123
+ typedef NTSTATUS (NTAPI * sNtQueryInformationFile )
124
+ (HANDLE FileHandle ,
125
+ PIO_STATUS_BLOCK IoStatusBlock ,
126
+ PVOID FileInformation ,
127
+ ULONG Length ,
128
+ FILE_INFORMATION_CLASS FileInformationClass );
129
+
130
+ #endif /* UV_WIN_NTDLL_H_ */
0 commit comments