ReactOS 0.4.15-dev-7942-gd23573b
irpstream.cpp File Reference
#include "private.hpp"
#include <debug.h>
Include dependency graph for irpstream.cpp:

Go to the source code of this file.

Classes

class  CIrpQueue
 
struct  KSSTREAM_TAG
 
struct  KSSTREAM_DATA
 

Macros

#define NDEBUG
 
#define STREAM_DATA_OFFSET   (0)
 

Typedefs

typedef struct KSSTREAM_TAGPKSSTREAM_TAG
 
typedef struct KSSTREAM_DATAPKSSTREAM_DATA
 

Functions

static PIRP RemoveHeadList_IRP (IN OUT PLIST_ENTRY QueueHead)
 
NTSTATUS NTAPI NewIrpQueue (IN IIrpQueue **Queue)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 11 of file irpstream.cpp.

◆ STREAM_DATA_OFFSET

#define STREAM_DATA_OFFSET   (0)

Definition at line 84 of file irpstream.cpp.

Typedef Documentation

◆ PKSSTREAM_DATA

◆ PKSSTREAM_TAG

Function Documentation

◆ NewIrpQueue()

NTSTATUS NTAPI NewIrpQueue ( IN IIrpQueue **  Queue)

Definition at line 864 of file irpstream.cpp.

866{
868 if (!This)
870
871 This->AddRef();
872
873 *Queue = (IIrpQueue*)This;
874 return STATUS_SUCCESS;
875}
#define NULL
Definition: types.h:112
#define NonPagedPool
Definition: env_spec_w32.h:307
#define TAG_PORTCLASS
Definition: private.hpp:24
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2225

◆ RemoveHeadList_IRP()

static PIRP RemoveHeadList_IRP ( IN OUT PLIST_ENTRY  QueueHead)
static

Definition at line 16 of file irpstream.cpp.

18{
19 PIRP Irp;
20 PLIST_ENTRY CurEntry;
21
22 for (CurEntry = QueueHead->Flink; CurEntry != QueueHead; CurEntry = CurEntry->Flink)
23 {
24 /* Get the IRP offset */
25 Irp = (PIRP)CONTAINING_RECORD(CurEntry, IRP, Tail.Overlay.ListEntry);
26
27 /* Remove the cancel routine */
29 {
30 /* Remove the IRP from the list and return it */
31 RemoveEntryList(&Irp->Tail.Overlay.ListEntry);
32 return Irp;
33 }
34 }
35
36 /* no non canceled irp has been found */
37 return NULL;
38}
struct _IRP * PIRP
_In_ PIRP Irp
Definition: csq.h:116
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986
IoSetCancelRoutine(Irp, CancelRoutine)
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260