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

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

removed ntclose (it's already in om.cpp)

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