28{
36
37 if (ReadOverflowOperation)
Peek =
TRUE;
38
41 TotalBytesCopied = 0;
42
44 {
47 QueueEntry);
48 }
49 else
50 {
53 QueueEntry);
54 }
55
56 while ((&DataEntry->
QueueEntry != &DataQueue->Queue) && (RemainingSize))
57 {
61 {
63 {
65 }
66 else
67 {
68 DataBuffer = &DataEntry[1];
69 }
70
73
75 {
76 Offset -= DataQueue->ByteOffset;
77 }
78
81
83 {
87 }
89 {
91 }
93
94
98
100 {
104 CompleteWrites =
TRUE;
105 }
106
108
109 if ((
Offset) || (ReadOverflowOperation && !TotalBytesCopied))
110 {
112 {
114 break;
115 }
116 }
117 else
118 {
119 if (!
Peek || ReadOverflowOperation)
120 {
121 if (ReadOverflowOperation)
122 {
125 QueueEntry);
126 ASSERT(TempDataEntry == DataEntry);
127 }
128
131 {
135 }
136 }
137
139 {
141 break;
142 }
143
144 ASSERT(!ReadOverflowOperation);
145 }
146 }
147
149 {
152 QueueEntry);
153 }
154 else
155 {
158 QueueEntry);
159 }
160 }
161
162 IoStatus.Information = TotalBytesCopied;
165}
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
PIRP NTAPI NpRemoveDataQueueEntry(IN PNP_DATA_QUEUE DataQueue, IN BOOLEAN Flag, IN PLIST_ENTRY List)
VOID NTAPI NpCompleteStalledWrites(IN PNP_DATA_QUEUE DataQueue, IN PLIST_ENTRY List)
PLIST_ENTRY NTAPI NpGetNextRealDataQueueEntry(IN PNP_DATA_QUEUE DataQueue, IN PLIST_ENTRY List)
static VOID Peek(_In_ PUCHAR ReadDataPort, _Out_writes_bytes_all_opt_(Length) PVOID Buffer, _In_ USHORT Length)
VOID NTAPI NpCopyClientContext(IN PNP_CCB Ccb, IN PNP_DATA_QUEUE_ENTRY DataQueueEntry)
#define InsertTailList(ListHead, Entry)
#define EXCEPTION_EXECUTE_HANDLER
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
#define FILE_PIPE_MESSAGE_MODE
_In_ ULONG _In_ ULONG Offset
#define _SEH2_EXCEPT(...)
#define STATUS_BUFFER_OVERFLOW
union _IRP::@1581 AssociatedIrp
struct _LIST_ENTRY * Flink
#define RtlCopyMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_Must_inspect_result_ _In_ WDFCMRESLIST List