ReactOS 0.4.15-dev-7934-g1dc8d80
misc.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: Parallel Port Function Driver
4 * FILE: drivers/parallel/parport/misc.c
5 * PURPOSE: Miscellaneous functions
6 */
7
8#include "parport.h"
9
10
11/* FUNCTIONS ****************************************************************/
12
16 IN PIRP Irp)
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}
29
30
33{
34 ASSERT(Irp);
35
36 if (Irp->MdlAddress)
37 return Irp->MdlAddress;
38 else
39 return Irp->AssociatedIrp.SystemBuffer;
40}
41
42/* EOF */
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
PVOID GetUserBuffer(IN PIRP Irp)
Definition: misc.c:32
DRIVER_DISPATCH ForwardIrpAndForget
Definition: i8042prt.h:341
#define ASSERT(a)
Definition: mode.c:44
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define IoCallDriver
Definition: irp.c:1225
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055