ReactOS 0.4.15-dev-8119-g4fb2fdb
misc.c File Reference
#include "parport.h"
Include dependency graph for misc.c:

Go to the source code of this file.

Functions

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

Function Documentation

◆ ForwardIrpAndForget()

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

Definition at line 15 of file misc.c.

17{
18 PDEVICE_OBJECT LowerDevice;
19
20 if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
21 LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice;
22 else
23 LowerDevice = ((PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->AttachedFdo;
24 ASSERT(LowerDevice);
25
27 return IoCallDriver(LowerDevice, Irp);
28}
_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:2055

◆ GetUserBuffer()

PVOID GetUserBuffer ( IN PIRP  Irp)

Definition at line 32 of file misc.c.

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

Referenced by PdoWrite().