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

Last change on this file since 5087 was 4405, checked in by phaller, 25 years ago

.

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