ReactOS 0.4.15-dev-7788-g1ad9096
fileinfo.c File Reference
#include "npfs.h"
Include dependency graph for fileinfo.c:

Go to the source code of this file.

Macros

#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_FILEINFO)
 

Functions

NTSTATUS NTAPI NpSetBasicInfo (IN PNP_CCB Ccb, IN PFILE_BASIC_INFORMATION Buffer)
 
NTSTATUS NTAPI NpSetPipeInfo (IN PNP_FCB Fcb, IN PNP_CCB Ccb, IN PFILE_PIPE_INFORMATION Buffer, IN ULONG NamedPipeEnd, IN PLIST_ENTRY List)
 
NTSTATUS NTAPI NpCommonSetInformation (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PLIST_ENTRY List)
 
NTSTATUS NTAPI NpFsdSetInformation (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI NpQueryBasicInfo (IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length)
 
NTSTATUS NTAPI NpQueryStandardInfo (IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length, IN ULONG NamedPipeEnd)
 
NTSTATUS NTAPI NpQueryEaInfo (IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length)
 
NTSTATUS NTAPI NpQueryNameInfo (IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length)
 
NTSTATUS NTAPI NpQueryInternalInfo (IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length)
 
NTSTATUS NTAPI NpQueryPositionInfo (IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length, IN ULONG NamedPipeEnd)
 
NTSTATUS NTAPI NpQueryPipeLocalInfo (IN PNP_FCB Fcb, IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length, IN ULONG NamedPipeEnd)
 
NTSTATUS NTAPI NpQueryPipeInfo (IN PNP_FCB Fcb, IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length, IN ULONG NamedPipeEnd)
 
NTSTATUS NTAPI NpCommonQueryInformation (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI NpFsdQueryInformation (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 

Macro Definition Documentation

◆ NPFS_BUGCHECK_FILE_ID

#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_FILEINFO)

Definition at line 14 of file fileinfo.c.

Function Documentation

◆ NpCommonQueryInformation()

NTSTATUS NTAPI NpCommonQueryInformation ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 370 of file fileinfo.c.

372{
373 PIO_STACK_LOCATION IoStack;
374 NODE_TYPE_CODE NodeTypeCode;
375 ULONG NamedPipeEnd;
376 PNP_FCB Fcb;
377 PNP_CCB Ccb;
378 FILE_INFORMATION_CLASS InfoClass;
381 PFILE_ALL_INFORMATION AllInfo;
383 PAGED_CODE();
384
386 NodeTypeCode = NpDecodeFileObject(IoStack->FileObject,
387 (PVOID*)&Fcb,
388 &Ccb,
389 &NamedPipeEnd);
390 if (!NodeTypeCode) return STATUS_PIPE_DISCONNECTED;
391
392 Buffer = Irp->AssociatedIrp.SystemBuffer;
393 Length = IoStack->Parameters.QueryFile.Length;
394 InfoClass = IoStack->Parameters.QueryFile.FileInformationClass;
395
396 if (NodeTypeCode != NPFS_NTC_CCB)
397 {
398 if (NodeTypeCode != NPFS_NTC_ROOT_DCB || InfoClass != FileNameInformation)
399 {
401 }
402 }
403
404 switch (InfoClass)
405 {
408 break;
409
411 Status = NpQueryPositionInfo(Ccb, Buffer, &Length, NamedPipeEnd);
412 break;
413
415 Status = NpQueryPipeInfo(Fcb, Ccb, Buffer, &Length, NamedPipeEnd);
416 break;
417
419 Status = NpQueryPipeLocalInfo(Fcb, Ccb, Buffer, &Length, NamedPipeEnd);
420 break;
421
424 break;
425
427 Status = NpQueryStandardInfo(Ccb, Buffer, &Length, NamedPipeEnd);
428 break;
429
432 break;
433
435
437 AllInfo = (PFILE_ALL_INFORMATION)Buffer;
439 NpQueryStandardInfo(Ccb, &AllInfo->StandardInformation, &Length, NamedPipeEnd);
442 NpQueryPositionInfo(Ccb, &AllInfo->PositionInformation, &Length, NamedPipeEnd);
444 break;
445
448 break;
449
450 default:
452 break;
453 }
454
455 Irp->IoStatus.Information = IoStack->Parameters.QueryFile.Length - Length;
456 return Status;
457}
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
_In_ PFCB Fcb
Definition: cdprocs.h:159
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
Definition: cdprocs.h:592
Definition: bufpool.h:45
_In_ PIRP Irp
Definition: csq.h:116
USHORT NODE_TYPE_CODE
Definition: nodetype.h:22
NTSTATUS NTAPI NpQueryEaInfo(IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length)
Definition: fileinfo.c:200
NTSTATUS NTAPI NpQueryPipeLocalInfo(IN PNP_FCB Fcb, IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length, IN ULONG NamedPipeEnd)
Definition: fileinfo.c:303
NTSTATUS NTAPI NpQueryPipeInfo(IN PNP_FCB Fcb, IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length, IN ULONG NamedPipeEnd)
Definition: fileinfo.c:350
NTSTATUS NTAPI NpQueryBasicInfo(IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length)
Definition: fileinfo.c:143
NTSTATUS NTAPI NpQueryInternalInfo(IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length)
Definition: fileinfo.c:256
NTSTATUS NTAPI NpQueryPositionInfo(IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length, IN ULONG NamedPipeEnd)
Definition: fileinfo.c:271
NTSTATUS NTAPI NpQueryNameInfo(IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length)
Definition: fileinfo.c:215
NTSTATUS NTAPI NpQueryStandardInfo(IN PNP_CCB Ccb, IN PVOID Buffer, IN OUT PULONG Length, IN ULONG NamedPipeEnd)
Definition: fileinfo.c:159
#define NPFS_NTC_ROOT_DCB
Definition: npfs.h:113
#define NPFS_NTC_CCB
Definition: npfs.h:115
NODE_TYPE_CODE NTAPI NpDecodeFileObject(IN PFILE_OBJECT FileObject, OUT PVOID *PrimaryContext OPTIONAL, OUT PNP_CCB *Ccb, OUT PULONG NamedPipeEnd OPTIONAL)
Definition: fileobsup.c:20
@ FilePositionInformation
Definition: from_kernel.h:75
@ FilePipeLocalInformation
Definition: from_kernel.h:85
@ FileAllInformation
Definition: from_kernel.h:79
@ FileInternalInformation
Definition: from_kernel.h:67
@ FileEaInformation
Definition: from_kernel.h:68
@ FilePipeInformation
Definition: from_kernel.h:84
@ FileNameInformation
Definition: from_kernel.h:70
@ FileBasicInformation
Definition: from_kernel.h:65
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
Definition: directory.c:44
Status
Definition: gdiplustypes.h:25
struct _FILE_ALL_INFORMATION * PFILE_ALL_INFORMATION
struct _FILE_ALIGNMENT_INFORMATION FILE_ALIGNMENT_INFORMATION
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_PIPE_DISCONNECTED
Definition: ntstatus.h:412
struct _FILE_ACCESS_INFORMATION FILE_ACCESS_INFORMATION
#define FileStandardInformation
Definition: propsheet.cpp:61
FILE_STANDARD_INFORMATION StandardInformation
Definition: winternl.h:797
FILE_EA_INFORMATION EaInformation
Definition: winternl.h:799
FILE_INTERNAL_INFORMATION InternalInformation
Definition: winternl.h:798
FILE_NAME_INFORMATION NameInformation
Definition: winternl.h:804
FILE_POSITION_INFORMATION PositionInformation
Definition: winternl.h:801
FILE_BASIC_INFORMATION BasicInformation
Definition: winternl.h:796
PFILE_OBJECT FileObject
Definition: iotypes.h:3169
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128
Definition: npfs.h:259
Definition: npfs.h:229
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2793

Referenced by NpFsdQueryInformation().

◆ NpCommonSetInformation()

NTSTATUS NTAPI NpCommonSetInformation ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PLIST_ENTRY  List 
)

Definition at line 80 of file fileinfo.c.

83{
84 NODE_TYPE_CODE NodeTypeCode;
85 PIO_STACK_LOCATION IoStack;
86 ULONG InfoClass;
90 ULONG NamedPipeEnd;
91 PAGED_CODE();
92
94
95 NodeTypeCode = NpDecodeFileObject(IoStack->FileObject,
96 (PVOID*)&Fcb,
97 &Ccb,
98 &NamedPipeEnd);
99 if (!NodeTypeCode) return STATUS_PIPE_DISCONNECTED;
100 if (NodeTypeCode != NPFS_NTC_CCB) return STATUS_INVALID_PARAMETER;
101
102 InfoClass = IoStack->Parameters.QueryFile.FileInformationClass;
103 Buffer = Irp->AssociatedIrp.SystemBuffer;
104
105 if (InfoClass == FileBasicInformation) return NpSetBasicInfo(Ccb, Buffer);
106
107 if (InfoClass != FilePipeInformation) return STATUS_INVALID_PARAMETER;
108
109 return NpSetPipeInfo(Fcb, Ccb, Buffer, NamedPipeEnd, List);
110}
NTSTATUS NTAPI NpSetPipeInfo(IN PNP_FCB Fcb, IN PNP_CCB Ccb, IN PFILE_PIPE_INFORMATION Buffer, IN ULONG NamedPipeEnd, IN PLIST_ENTRY List)
Definition: fileinfo.c:29
NTSTATUS NTAPI NpSetBasicInfo(IN PNP_CCB Ccb, IN PFILE_BASIC_INFORMATION Buffer)
Definition: fileinfo.c:20
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550

Referenced by NpFsdSetInformation().

◆ NpFsdQueryInformation()

NTSTATUS NTAPI NpFsdQueryInformation ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 461 of file fileinfo.c.

463{
465 PAGED_CODE();
466
469
471
472 NpReleaseVcb();
474
475 if (Status != STATUS_PENDING)
476 {
477 Irp->IoStatus.Status = Status;
479 }
480
481 return Status;
482}
NTSTATUS NTAPI NpCommonQueryInformation(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fileinfo.c:370
FORCEINLINE VOID NpReleaseVcb(VOID)
Definition: npfs.h:344
FORCEINLINE VOID NpAcquireSharedVcb(VOID)
Definition: npfs.h:328
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
#define IoCompleteRequest
Definition: irp.c:1240
#define STATUS_PENDING
Definition: ntstatus.h:82
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
#define IO_NAMED_PIPE_INCREMENT
Definition: iotypes.h:604

Referenced by DriverEntry().

◆ NpFsdSetInformation()

NTSTATUS NTAPI NpFsdSetInformation ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 114 of file fileinfo.c.

116{
118 LIST_ENTRY DeferredList;
119 PAGED_CODE();
120
121 InitializeListHead(&DeferredList);
122
125
127
128 NpReleaseVcb();
129 NpCompleteDeferredIrps(&DeferredList);
131
132 if (Status != STATUS_PENDING)
133 {
134 Irp->IoStatus.Status = Status;
136 }
137
138 return Status;
139}
NTSTATUS NTAPI NpCommonSetInformation(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PLIST_ENTRY List)
Definition: fileinfo.c:80
FORCEINLINE VOID NpAcquireExclusiveVcb(VOID)
Definition: npfs.h:336
FORCEINLINE VOID NpCompleteDeferredIrps(IN PLIST_ENTRY DeferredList)
Definition: npfs.h:356
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
Definition: typedefs.h:120

Referenced by DriverEntry().

◆ NpQueryBasicInfo()

NTSTATUS NTAPI NpQueryBasicInfo ( IN PNP_CCB  Ccb,
IN PVOID  Buffer,
IN OUT PULONG  Length 
)

Definition at line 143 of file fileinfo.c.

146{
147 PFILE_BASIC_INFORMATION InfoBuffer = Buffer;
148
149 *Length -= sizeof(*InfoBuffer);
150
151 RtlZeroMemory(InfoBuffer, sizeof(*InfoBuffer));
153
154 return STATUS_SUCCESS;
155}
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define STATUS_SUCCESS
Definition: shellext.h:65
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by NpCommonQueryInformation().

◆ NpQueryEaInfo()

NTSTATUS NTAPI NpQueryEaInfo ( IN PNP_CCB  Ccb,
IN PVOID  Buffer,
IN OUT PULONG  Length 
)

Definition at line 200 of file fileinfo.c.

203{
204 PFILE_EA_INFORMATION InfoBuffer = Buffer;
205
206 *Length -= sizeof(*InfoBuffer);
207
208 RtlZeroMemory(InfoBuffer, sizeof(*InfoBuffer));
209
210 return STATUS_SUCCESS;
211}

Referenced by NpCommonQueryInformation().

◆ NpQueryInternalInfo()

NTSTATUS NTAPI NpQueryInternalInfo ( IN PNP_CCB  Ccb,
IN PVOID  Buffer,
IN OUT PULONG  Length 
)

Definition at line 256 of file fileinfo.c.

259{
261
262 *Length -= sizeof(*InfoBuffer);
263
264 RtlZeroMemory(InfoBuffer, sizeof(*InfoBuffer));
265
266 return STATUS_SUCCESS;
267}

Referenced by NpCommonQueryInformation().

◆ NpQueryNameInfo()

NTSTATUS NTAPI NpQueryNameInfo ( IN PNP_CCB  Ccb,
IN PVOID  Buffer,
IN OUT PULONG  Length 
)

Definition at line 215 of file fileinfo.c.

218{
219 PFILE_NAME_INFORMATION InfoBuffer = Buffer;
220 USHORT NameLength;
222 PWCHAR Name;
223
224 *Length -= sizeof(*InfoBuffer);
225
226 if (Ccb->NodeType == NPFS_NTC_ROOT_DCB_CCB)
227 {
228 NameLength = NpVcb->RootDcb->FullName.Length;
229 Name = NpVcb->RootDcb->FullName.Buffer;
230 }
231 else
232 {
233 NameLength = Ccb->Fcb->FullName.Length;
234 Name = Ccb->Fcb->FullName.Buffer;
235 }
236
237 if (*Length < NameLength)
238 {
240 NameLength = (USHORT)*Length;
241 }
242 else
243 {
245 }
246
247 RtlCopyMemory(InfoBuffer->FileName, Name, NameLength);
248 InfoBuffer->FileNameLength = NameLength;
249
250 *Length -= NameLength;
251 return Status;
252}
struct NameRec_ * Name
Definition: cdprocs.h:460
#define NPFS_NTC_ROOT_DCB_CCB
Definition: npfs.h:117
PNP_VCB NpVcb
Definition: strucsup.c:19
unsigned short USHORT
Definition: pedump.c:61
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
struct _FCB::@719::@722 Fcb
PNP_DCB RootDcb
Definition: npfs.h:281
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint16_t * PWCHAR
Definition: typedefs.h:56

Referenced by NpCommonQueryInformation().

◆ NpQueryPipeInfo()

NTSTATUS NTAPI NpQueryPipeInfo ( IN PNP_FCB  Fcb,
IN PNP_CCB  Ccb,
IN PVOID  Buffer,
IN OUT PULONG  Length,
IN ULONG  NamedPipeEnd 
)

Definition at line 350 of file fileinfo.c.

355{
356 PFILE_PIPE_INFORMATION InfoBuffer = Buffer;
357
358 *Length -= sizeof(*InfoBuffer);
359
360 RtlZeroMemory(InfoBuffer, sizeof(*InfoBuffer));
361
362 InfoBuffer->ReadMode = Ccb->ReadMode[NamedPipeEnd];
363 InfoBuffer->CompletionMode = Ccb->CompletionMode[NamedPipeEnd];
364
365 return STATUS_SUCCESS;
366}

Referenced by NpCommonQueryInformation().

◆ NpQueryPipeLocalInfo()

NTSTATUS NTAPI NpQueryPipeLocalInfo ( IN PNP_FCB  Fcb,
IN PNP_CCB  Ccb,
IN PVOID  Buffer,
IN OUT PULONG  Length,
IN ULONG  NamedPipeEnd 
)

Definition at line 303 of file fileinfo.c.

308{
310 PNP_DATA_QUEUE InQueue, OutQueue;
311
312 *Length -= sizeof(*InfoBuffer);
313
314 RtlZeroMemory(InfoBuffer, sizeof(*InfoBuffer));
315
316 InQueue = &Ccb->DataQueue[FILE_PIPE_INBOUND];
317 OutQueue = &Ccb->DataQueue[FILE_PIPE_OUTBOUND];
318
319 InfoBuffer->NamedPipeType = Fcb->NamedPipeType;
320 InfoBuffer->NamedPipeConfiguration = Fcb->NamedPipeConfiguration;
321 InfoBuffer->MaximumInstances = Fcb->MaximumInstances;
322 InfoBuffer->CurrentInstances = Fcb->CurrentInstances;
323 InfoBuffer->InboundQuota = InQueue->Quota;
324 InfoBuffer->OutboundQuota = OutQueue->Quota;
325 InfoBuffer->NamedPipeState = Ccb->NamedPipeState;
326 InfoBuffer->NamedPipeEnd = NamedPipeEnd;
327
328 if (NamedPipeEnd == FILE_PIPE_SERVER_END)
329 {
330 if (InQueue->QueueState == WriteEntries)
331 {
332 InfoBuffer->ReadDataAvailable = InQueue->BytesInQueue - InQueue->ByteOffset;
333 }
334 InfoBuffer->WriteQuotaAvailable = OutQueue->Quota - OutQueue->QuotaUsed;
335 }
336 else
337 {
338 if (OutQueue->QueueState == WriteEntries)
339 {
340 InfoBuffer->ReadDataAvailable = OutQueue->BytesInQueue - OutQueue->ByteOffset;
341 }
342 InfoBuffer->WriteQuotaAvailable = OutQueue->Quota - InQueue->QuotaUsed;
343 }
344
345 return STATUS_SUCCESS;
346}
@ WriteEntries
Definition: npfs.h:124
#define FILE_PIPE_OUTBOUND
Definition: iotypes.h:82
#define FILE_PIPE_INBOUND
Definition: iotypes.h:81
#define FILE_PIPE_SERVER_END
Definition: iotypes.h:85
ULONG Quota
Definition: npfs.h:144
ULONG QueueState
Definition: npfs.h:139
ULONG QuotaUsed
Definition: npfs.h:142
ULONG BytesInQueue
Definition: npfs.h:140
ULONG ByteOffset
Definition: npfs.h:143

Referenced by NpCommonQueryInformation().

◆ NpQueryPositionInfo()

NTSTATUS NTAPI NpQueryPositionInfo ( IN PNP_CCB  Ccb,
IN PVOID  Buffer,
IN OUT PULONG  Length,
IN ULONG  NamedPipeEnd 
)

Definition at line 271 of file fileinfo.c.

275{
276 PNP_DATA_QUEUE DataQueue;
278
279 *Length -= sizeof(*InfoBuffer);
280
281 RtlZeroMemory(InfoBuffer, sizeof(*InfoBuffer));
282
283 if (NamedPipeEnd == FILE_PIPE_SERVER_END)
284 {
285 DataQueue = &Ccb->DataQueue[FILE_PIPE_INBOUND];
286 }
287 else
288 {
289 DataQueue = &Ccb->DataQueue[FILE_PIPE_OUTBOUND];
290 }
291
292 if (DataQueue->QueueState == WriteEntries)
293 {
294 InfoBuffer->CurrentByteOffset.QuadPart = DataQueue->BytesInQueue -
295 DataQueue->ByteOffset;
296 }
297
298 return STATUS_SUCCESS;
299}
LARGE_INTEGER CurrentByteOffset
Definition: nt_native.h:955
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by NpCommonQueryInformation().

◆ NpQueryStandardInfo()

NTSTATUS NTAPI NpQueryStandardInfo ( IN PNP_CCB  Ccb,
IN PVOID  Buffer,
IN OUT PULONG  Length,
IN ULONG  NamedPipeEnd 
)

Definition at line 159 of file fileinfo.c.

163{
164 PNP_DATA_QUEUE DataQueue;
166
167 *Length -= sizeof(*InfoBuffer);
168
169 RtlZeroMemory(InfoBuffer, sizeof(*InfoBuffer));
170
171 if (NamedPipeEnd == FILE_PIPE_SERVER_END)
172 {
173 DataQueue = &Ccb->DataQueue[FILE_PIPE_INBOUND];
174 }
175 else
176 {
177 DataQueue = &Ccb->DataQueue[FILE_PIPE_OUTBOUND];
178 }
179
180 InfoBuffer->AllocationSize.LowPart = Ccb->DataQueue[FILE_PIPE_INBOUND].Quota +
181 Ccb->DataQueue[FILE_PIPE_OUTBOUND].Quota;
182 InfoBuffer->AllocationSize.HighPart = 0;
183
184 if (DataQueue->QueueState == WriteEntries)
185 {
186 InfoBuffer->EndOfFile.HighPart = 0;
187 InfoBuffer->EndOfFile.LowPart = DataQueue->BytesInQueue -
188 DataQueue->ByteOffset;
189 }
190
191 InfoBuffer->Directory = FALSE;
192 InfoBuffer->NumberOfLinks = 1;
193 InfoBuffer->DeletePending = TRUE;
194
195 return STATUS_SUCCESS;
196}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LARGE_INTEGER AllocationSize
Definition: propsheet.cpp:54
ULONG LowPart
Definition: typedefs.h:106

Referenced by NpCommonQueryInformation().

◆ NpSetBasicInfo()

NTSTATUS NTAPI NpSetBasicInfo ( IN PNP_CCB  Ccb,
IN PFILE_BASIC_INFORMATION  Buffer 
)

Definition at line 20 of file fileinfo.c.

22{
23 PAGED_CODE();
24 return STATUS_SUCCESS;
25}

Referenced by NpCommonSetInformation().

◆ NpSetPipeInfo()

NTSTATUS NTAPI NpSetPipeInfo ( IN PNP_FCB  Fcb,
IN PNP_CCB  Ccb,
IN PFILE_PIPE_INFORMATION  Buffer,
IN ULONG  NamedPipeEnd,
IN PLIST_ENTRY  List 
)

Definition at line 29 of file fileinfo.c.

34{
36 PNP_DATA_QUEUE ReadQueue, WriteQueue;
37 PAGED_CODE();
38
39 if (Buffer->ReadMode == FILE_PIPE_MESSAGE_MODE && Fcb->NamedPipeType == FILE_PIPE_BYTE_STREAM_TYPE)
40 {
42 }
43
44 if (NamedPipeEnd != FILE_PIPE_CLIENT_END)
45 {
46 if (NamedPipeEnd != FILE_PIPE_SERVER_END)
47 {
48 NpBugCheck(NamedPipeEnd, 0, 0);
49 }
50 ReadQueue = &Ccb->DataQueue[FILE_PIPE_INBOUND];
51 WriteQueue = &Ccb->DataQueue[FILE_PIPE_OUTBOUND];
52 }
53 else
54 {
55 ReadQueue = &Ccb->DataQueue[FILE_PIPE_OUTBOUND];
56 WriteQueue = &Ccb->DataQueue[FILE_PIPE_INBOUND];
57 }
58
59 if (Buffer->CompletionMode != FILE_PIPE_COMPLETE_OPERATION ||
60 Ccb->CompletionMode[NamedPipeEnd] == FILE_PIPE_COMPLETE_OPERATION ||
61 (ReadQueue->QueueState != ReadEntries &&
62 WriteQueue->QueueState != WriteEntries))
63 {
64 Ccb->ReadMode[NamedPipeEnd] = Buffer->ReadMode & 0xFF;
65 Ccb->CompletionMode[NamedPipeEnd] = Buffer->CompletionMode & 0xFF;
66
69 }
70 else
71 {
73 }
74
75 return Status;
76}
VOID NTAPI NpCheckForNotify(IN PNP_DCB Dcb, IN BOOLEAN SecondList, IN PLIST_ENTRY List)
Definition: create.c:20
@ ReadEntries
Definition: npfs.h:123
#define NpBugCheck(p1, p2, p3)
Definition: npfs.h:106
#define FILE_PIPE_BYTE_STREAM_TYPE
Definition: iotypes.h:75
#define FILE_PIPE_CLIENT_END
Definition: iotypes.h:84
#define FILE_PIPE_COMPLETE_OPERATION
Definition: iotypes.h:80
#define FILE_PIPE_MESSAGE_MODE
Definition: iotypes.h:78
#define STATUS_PIPE_BUSY
Definition: ntstatus.h:410
struct _FCB * ParentDcb
Definition: fatstruc.h:836

Referenced by NpCommonSetInformation().