source: trunk/src/NTDLL/file.cpp@ 51

Last change on this file since 51 was 51, checked in by sandervl, 26 years ago

* empty log message *

File size: 11.5 KB
Line 
1/*
2 * Project Odin Software License can be found in LICENSE.TXT
3 * Win32 NT Runtime / NTDLL for OS/2
4 *
5 * Copyright 1998 original WINE Author
6 * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
7 */
8
9#include <stdlib.h>
10#include <string.h>
11
12#include "ntdll.h"
13
14
15//******************************************************************************
16//NtClose has to call CloseHandle since the Handlemanager has to be
17//called.
18//******************************************************************************
19NTSTATUS WIN32API NtClose(HANDLE hHandle)
20{
21 dprintf(("NTDLL: NtClose(%08x) not properly implemented.\n",
22 hHandle));
23
24 /* @@@PH 98/05/05 function from NTDLL */
25 return (CloseHandle(hHandle));
26}
27
28
29
30/**************************************************************************
31 * NtOpenFile [NTDLL.127]
32 * FUNCTION: Opens a file
33 * ARGUMENTS:
34 * FileHandle Variable that receives the file handle on return
35 * DesiredAccess Access desired by the caller to the file
36 * ObjectAttributes Structue describing the file to be opened
37 * IoStatusBlock Receives details about the result of the operation
38 * ShareAccess Type of shared access the caller requires
39 * OpenOptions Options for the file open
40 */
41NTSTATUS WIN32API NtOpenFile(PHANDLE FileHandle,
42 ACCESS_MASK DesiredAccess,
43 POBJECT_ATTRIBUTES ObjectAttributes,
44 PIO_STATUS_BLOCK IoStatusBlock,
45 ULONG ShareAccess,
46 ULONG OpenOptions)
47{
48 dprintf(("NTDLL: NtOpenFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
49 FileHandle,
50 DesiredAccess,
51 ObjectAttributes,
52 IoStatusBlock,
53 ShareAccess,
54 OpenOptions));
55
56 return 0;
57}
58
59
60/**************************************************************************
61 * NtCreateFile [NTDLL.73]
62 * FUNCTION: Either causes a new file or directory to be created, or it opens
63 * an existing file, device, directory or volume, giving the caller a handle
64 * for the file object. This handle can be used by subsequent calls to
65 * manipulate data within the file or the file object's state of attributes.
66 * ARGUMENTS:
67 * FileHandle Points to a variable which receives the file handle on return
68 * DesiredAccess Desired access to the file
69 * ObjectAttributes Structure describing the file
70 * IoStatusBlock Receives information about the operation on return
71 * AllocationSize Initial size of the file in bytes
72 * FileAttributes Attributes to create the file with
73 * ShareAccess Type of shared access the caller would like to the file
74 * CreateDisposition Specifies what to do, depending on whether the file already exists
75 * CreateOptions Options for creating a new file
76 * EaBuffer Undocumented
77 * EaLength Undocumented
78 */
79NTSTATUS WIN32API NtCreateFile(PHANDLE FileHandle,
80 ACCESS_MASK DesiredAccess,
81 POBJECT_ATTRIBUTES ObjectAttributes,
82 PIO_STATUS_BLOCK IoStatusBlock,
83 PLARGE_INTEGER AllocateSize,
84 ULONG FileAttributes,
85 ULONG ShareAccess,
86 ULONG CreateDisposition,
87 ULONG CreateOptions,
88 PVOID EaBuffer,
89 ULONG EaLength)
90{
91 dprintf(("NTDLL: NtCreateFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
92 FileHandle,
93 DesiredAccess,
94 ObjectAttributes,
95 IoStatusBlock,
96 AllocateSize,
97 FileAttributes,
98 ShareAccess,
99 CreateDisposition,
100 CreateOptions,
101 EaBuffer,
102 EaLength));
103
104 return 0;
105}
106
107
108/******************************************************************************
109 * NtReadFile [NTDLL]
110 * ZwReadFile
111 *
112 * Parameters
113 * HANDLE32 FileHandle
114 * HANDLE32 Event OPTIONAL
115 * PIO_APC_ROUTINE ApcRoutine OPTIONAL
116 * PVOID ApcContext OPTIONAL
117 * PIO_STATUS_BLOCK IoStatusBlock
118 * PVOID Buffer
119 * ULONG Length
120 * PLARGE_INTEGER ByteOffset OPTIONAL
121 * PULONG Key OPTIONAL
122 */
123NTSTATUS WIN32API NtReadFile (HANDLE FileHandle,
124 HANDLE EventHandle,
125 PIO_APC_ROUTINE ApcRoutine,
126 PVOID ApcContext,
127 PIO_STATUS_BLOCK IoStatusBlock,
128 PVOID Buffer,
129 ULONG Length,
130 PLARGE_INTEGER ByteOffset,
131 PULONG Key)
132{
133 dprintf(("NTDLL: NtReadFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
134 FileHandle,
135 EventHandle,
136 ApcRoutine,
137 ApcContext,
138 IoStatusBlock,
139 Buffer,
140 Length,
141 ByteOffset,
142 Key));
143
144 return 0;
145}
146
147
148/**************************************************************************
149 * NtDeviceIoControlFile [NTDLL.94]
150 */
151NTSTATUS WIN32API NtDeviceIoControlFile(HANDLE DeviceHandle,
152 HANDLE Event,
153 PIO_APC_ROUTINE UserApcRoutine,
154 PVOID UserApcContext,
155 PIO_STATUS_BLOCK IoStatusBlock,
156 ULONG IoControlCode,
157 PVOID InputBuffer,
158 ULONG InputBufferSize,
159 PVOID OutputBuffer,
160 ULONG OutputBufferSize)
161{
162 dprintf(("NTDLL: NtDeviceIoControlFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
163 DeviceHandle,
164 Event,
165 UserApcRoutine,
166 UserApcContext,
167 IoStatusBlock,
168 IoControlCode,
169 InputBuffer,
170 InputBufferSize,
171 OutputBuffer,
172 OutputBufferSize));
173
174 return 0;
175}
176
177
178/******************************************************************************
179 * NtFsControlFile [NTDLL.108]
180 */
181NTSTATUS WIN32API NtFsControlFile(HANDLE DeviceHandle,
182 HANDLE Event,
183 PIO_APC_ROUTINE UserApcRoutine,
184 PVOID UserApcContext,
185 PIO_STATUS_BLOCK IoStatusBlock,
186 ULONG IoControlCode,
187 PVOID InputBuffer,
188 ULONG InputBufferSize,
189 PVOID OutputBuffer,
190 ULONG OutputBufferSize)
191{
192 dprintf(("NTDLL: NtFsControlFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
193 DeviceHandle,
194 Event,
195 UserApcRoutine,
196 UserApcContext,
197 IoStatusBlock,
198 IoControlCode,
199 InputBuffer,
200 InputBufferSize,
201 OutputBuffer,
202 OutputBufferSize));
203
204 return 0;
205}
206
207
208/******************************************************************************
209 * NtSetVolumeInformationFile [NTDLL]
210 */
211NTSTATUS WIN32API NtSetVolumeInformationFile(HANDLE FileHandle,
212 PVOID VolumeInformationClass,
213 PVOID VolumeInformation,
214 ULONG Length)
215{
216 dprintf(("NTDLL: NtSetVolumeInformationFile(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
217 FileHandle,
218 VolumeInformationClass,
219 VolumeInformation,
220 Length));
221
222 return 0;
223}
224
225
226/******************************************************************************
227 * NtQueryInformationFile [NTDLL]
228 */
229NTSTATUS WIN32API NtQueryInformationFile(HANDLE FileHandle,
230 PIO_STATUS_BLOCK IoStatusBlock,
231 PVOID FileInformation,
232 ULONG Length,
233 FILE_INFORMATION_CLASS FileInformationClass)
234{
235 dprintf(("NTDLL: NtQueryInformationFile(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
236 FileHandle,
237 IoStatusBlock,
238 FileInformation,
239 Length,
240 FileInformationClass));
241
242 return 0;
243}
244
245
246/******************************************************************************
247 * NtSetInformationFile [NTDLL]
248 */
249NTSTATUS WIN32API NtSetInformationFile(HANDLE FileHandle,
250 PIO_STATUS_BLOCK IoStatusBlock,
251 PVOID FileInformation,
252 ULONG Length,
253 FILE_INFORMATION_CLASS FileInformationClass)
254{
255 dprintf(("NTDLL: NtSetInformationFile(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
256 FileHandle,
257 IoStatusBlock,
258 FileInformation,
259 Length,
260 FileInformationClass));
261
262 return 0;
263}
264
265
266/******************************************************************************
267 * NtQueryDirectoryFile [NTDLL]
268 * ZwQueryDirectoryFile
269 */
270NTSTATUS WIN32API NtQueryDirectoryFile(HANDLE FileHandle,
271 HANDLE Event,
272 PIO_APC_ROUTINE ApcRoutine,
273 PVOID ApcContext,
274 PIO_STATUS_BLOCK IoStatusBlock,
275 PVOID FileInformation,
276 ULONG Length,
277 FILE_INFORMATION_CLASS FileInformationClass,
278 BOOLEAN ReturnSingleEntry,
279 PUNICODE_STRING FileName,
280 BOOLEAN RestartScan)
281{
282 dprintf(("NTDLL: NtQueryDirectoryFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
283 FileHandle,
284 Event,
285 ApcRoutine,
286 ApcContext,
287 IoStatusBlock,
288 FileInformation,
289 Length,
290 FileInformationClass,
291 ReturnSingleEntry,
292 FileName,
293 RestartScan));
294
295 return 0;
296}
297
298
Note: See TracBrowser for help on using the repository browser.