#include <iodevice.h>
Inherits BazisLib::DDK::PNPDevice.
Inherited by BazisLib::DDK::BusDevice, and BazisLib::DDK::StorageDevice [protected]
.
Public Member Functions | |
IODevice (DEVICE_TYPE DeviceType=FILE_DEVICE_UNKNOWN, bool bDeleteThisAfterRemoveRequest=false, ULONG DeviceCharacteristics=FILE_DEVICE_SECURE_OPEN, bool bExclusive=FALSE, ULONG AdditionalDeviceFlags=DO_POWER_PAGABLE, LPCWSTR pwszDeviceName=NULL) | |
virtual | ~IODevice () |
Protected Member Functions | |
virtual NTSTATUS | DispatchRoutine (IN IncomingIrp *Irp, IO_STACK_LOCATION *IrpSp) override |
virtual NTSTATUS | DispatchCleanup (IN IncomingIrp *Irp, IO_STACK_LOCATION *IrpSp) |
virtual NTSTATUS | OnCreate (PIO_SECURITY_CONTEXT SecurityContext, ULONG Options, USHORT FileAttributes, USHORT ShareAccess, PFILE_OBJECT pFileObj) |
virtual NTSTATUS | OnClose () |
virtual NTSTATUS | OnRead (void *pBuffer, ULONG Length, ULONG Key, ULONGLONG ByteOffset, PULONG pBytesDone) |
virtual NTSTATUS | OnRead (PMDL pMdl, ULONG Length, ULONG Key, ULONGLONG ByteOffset, PULONG pBytesDone) |
virtual NTSTATUS | OnWrite (const void *pBuffer, ULONG Length, ULONG Key, ULONGLONG ByteOffset, PULONG pBytesDone) |
virtual NTSTATUS | OnWrite (PMDL pMdl, ULONG Length, ULONG Key, ULONGLONG ByteOffset, PULONG pBytesDone) |
virtual NTSTATUS | OnDeviceControl (ULONG ControlCode, bool IsInternal, void *pInOutBuffer, ULONG InputLength, ULONG OutputLength, PULONG pBytesDone) |
virtual NTSTATUS | OnDeviceControl (ULONG ControlCode, bool IsInternal, void *pInBuffer, PMDL InOutBuffer, ULONG InputLength, ULONG OutputLength, PULONG pBytesDone) |
virtual NTSTATUS | OnDeviceControl (ULONG ControlCode, bool IsInternal, void *pUserInputBuffer, void *pUserOutputBuffer, ULONG InputLength, ULONG OutputLength, PULONG pBytesDone) |
BazisLib::DDK::IODevice::IODevice | ( | DEVICE_TYPE | DeviceType = FILE_DEVICE_UNKNOWN , |
|
bool | bDeleteThisAfterRemoveRequest = false , |
|||
ULONG | DeviceCharacteristics = FILE_DEVICE_SECURE_OPEN , |
|||
bool | bExclusive = FALSE , |
|||
ULONG | AdditionalDeviceFlags = DO_POWER_PAGABLE , |
|||
LPCWSTR | pwszDeviceName = NULL | |||
) |
virtual BazisLib::DDK::IODevice::~IODevice | ( | ) | [virtual] |
virtual NTSTATUS BazisLib::DDK::IODevice::DispatchCleanup | ( | IN IncomingIrp * | Irp, | |
IO_STACK_LOCATION * | IrpSp | |||
) | [inline, protected, virtual] |
virtual NTSTATUS BazisLib::DDK::IODevice::DispatchRoutine | ( | IN IncomingIrp * | Irp, | |
IO_STACK_LOCATION * | IrpSp | |||
) | [override, protected, virtual] |
This method is called every time a device receives an IRP. It Device class it handles the following codes by calling the corresponding virtual methods:
Reimplemented from BazisLib::DDK::PNPDevice.
Reimplemented in BazisLib::DDK::BasicStorageVolume.
virtual NTSTATUS BazisLib::DDK::IODevice::OnClose | ( | ) | [inline, protected, virtual] |
Reimplemented in BazisLib::DDK::BasicStorageVolume.
virtual NTSTATUS BazisLib::DDK::IODevice::OnCreate | ( | PIO_SECURITY_CONTEXT | SecurityContext, | |
ULONG | Options, | |||
USHORT | FileAttributes, | |||
USHORT | ShareAccess, | |||
PFILE_OBJECT | pFileObj | |||
) | [inline, protected, virtual] |
Reimplemented in BazisLib::DDK::BasicStorageVolume.
virtual NTSTATUS BazisLib::DDK::IODevice::OnDeviceControl | ( | ULONG | ControlCode, | |
bool | IsInternal, | |||
void * | pUserInputBuffer, | |||
void * | pUserOutputBuffer, | |||
ULONG | InputLength, | |||
ULONG | OutputLength, | |||
PULONG | pBytesDone | |||
) | [inline, protected, virtual] |
This method is called when the driver receives an IRP_MJ_DEVICE_CONTROL or IRP_MJ_INTERNAL_DEVICE_CONTROL packet with Transfer Type bits set to METHOD_NEITHER
pUserInputBuffer | Contains the address of the input buffer in USER SPACE! | |
pUserOutputBuffer | Contains the address of the output buffer in USER SPACE! |
virtual NTSTATUS BazisLib::DDK::IODevice::OnDeviceControl | ( | ULONG | ControlCode, | |
bool | IsInternal, | |||
void * | pInBuffer, | |||
PMDL | InOutBuffer, | |||
ULONG | InputLength, | |||
ULONG | OutputLength, | |||
PULONG | pBytesDone | |||
) | [inline, protected, virtual] |
This method is called when the driver receives an IRP_MJ_DEVICE_CONTROL or IRP_MJ_INTERNAL_DEVICE_CONTROL packet with Transfer Type bits set to METHOD_IN_DIRECT or METHOD_OUT_DIRECT
pInBuffer | Contains the address of the system buffer shadowing the input buffer. | |
InOutBuffer | Contains the MDL for the output buffer that can be used for input of output operation depending on the Transfer Type bits in the IOCTL code. |
virtual NTSTATUS BazisLib::DDK::IODevice::OnDeviceControl | ( | ULONG | ControlCode, | |
bool | IsInternal, | |||
void * | pInOutBuffer, | |||
ULONG | InputLength, | |||
ULONG | OutputLength, | |||
PULONG | pBytesDone | |||
) | [inline, protected, virtual] |
This method is called when the driver receives an IRP_MJ_DEVICE_CONTROL or IRP_MJ_INTERNAL_DEVICE_CONTROL packet with Transfer Type bits set to METHOD_BUFFERED
Reimplemented in BazisLib::DDK::BasicCDVolume, BazisLib::DDK::UniversalVolume, and BazisLib::DDK::StorageDevice.
virtual NTSTATUS BazisLib::DDK::IODevice::OnRead | ( | PMDL | pMdl, | |
ULONG | Length, | |||
ULONG | Key, | |||
ULONGLONG | ByteOffset, | |||
PULONG | pBytesDone | |||
) | [inline, protected, virtual] |
This method is called when the driver receives an IRP_MJ_READ packet. And the DO_DIRECT_IO flag is set in the DEVICE_OBJECT::Flags field.
Reimplemented in BazisLib::DDK::BasicStorageVolume.
virtual NTSTATUS BazisLib::DDK::IODevice::OnRead | ( | void * | pBuffer, | |
ULONG | Length, | |||
ULONG | Key, | |||
ULONGLONG | ByteOffset, | |||
PULONG | pBytesDone | |||
) | [inline, protected, virtual] |
This method is called when the driver receives an IRP_MJ_READ packet. And the DO_BUFFERED_IO flag is set in the DEVICE_OBJECT::Flags field.
virtual NTSTATUS BazisLib::DDK::IODevice::OnWrite | ( | PMDL | pMdl, | |
ULONG | Length, | |||
ULONG | Key, | |||
ULONGLONG | ByteOffset, | |||
PULONG | pBytesDone | |||
) | [inline, protected, virtual] |
This method is called when the driver receives an IRP_MJ_WRITE packet. And the DO_DIRECT_IO flag is set in the DEVICE_OBJECT::Flags field.
Reimplemented in BazisLib::DDK::BasicStorageVolume.
virtual NTSTATUS BazisLib::DDK::IODevice::OnWrite | ( | const void * | pBuffer, | |
ULONG | Length, | |||
ULONG | Key, | |||
ULONGLONG | ByteOffset, | |||
PULONG | pBytesDone | |||
) | [inline, protected, virtual] |
This method is called when the driver receives an IRP_MJ_WRITE packet. And the DO_BUFFERED_IO flag is set in the DEVICE_OBJECT::Flags field.