ReactOS 0.4.16-dev-1946-g52006dd
misc.c File Reference
#include "parport.h"
#include <debug.h>
Include dependency graph for misc.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS NTAPI ForwardIrpAndForget (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
PVOID GetUserBuffer (IN PIRP Irp)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 9 of file misc.c.

Function Documentation

◆ ForwardIrpAndForget()

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

Definition at line 16 of file misc.c.

18{
19 PDEVICE_OBJECT LowerDevice;
20
21 if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
22 LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice;
23 else
24 LowerDevice = ((PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->AttachedFdo;
25 ASSERT(LowerDevice);
26
28 return IoCallDriver(LowerDevice, Irp);
29}
_In_ PIRP Irp
Definition: csq.h:116
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
#define ASSERT(a)
Definition: mode.c:44
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define IoCallDriver
Definition: irp.c:1225
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061

◆ GetUserBuffer()

PVOID GetUserBuffer ( IN PIRP  Irp)

Definition at line 33 of file misc.c.

34{
35 ASSERT(Irp);
36
37 if (Irp->MdlAddress)
38 return Irp->MdlAddress;
39 else
40 return Irp->AssociatedIrp.SystemBuffer;
41}

Referenced by PdoWrite().