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

Last change on this file since 97 was 97, checked in by phaller, 26 years ago

Add: added cvs variable $Id$ to source files.

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