// parallel.h
PPARALLEL_READ PparallelRead;
NTSTATUS PparallelRead(
[in] PVOID Context,
[out] PVOID Buffer,
[in] ULONG NumBytesToRead,
[out] PULONG NumBytesRead,
[in] UCHAR Channel
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The PPARALLEL_READ-typed callback routine reads data from a parallel device. The system-supplied bus driver for parallel ports supplies this routine.
Context [in]Pointer to the device extension of a parallel device's physical device object (PDO).
Buffer [out]Pointer to a read buffer that the caller allocates.
NumBytesToRead [in]Specifies the number of bytes to read. Must less than or equal to the number of bytes in the caller-allocated read buffer.
NumBytesRead [out]Specifies the number of bytes that were actually read from the parallel device and saved in the caller-allocated read buffer.
Channel [in]Not used.
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The requested data was successfully transferred from the device. |
| STATUS_*Xxx* | An internal operation resulted in an NTSTATUS error. |
typedef NTSTATUS ( *PPARALLEL_READ)(
_In_ PVOID Context,
_Out_ PVOID Buffer,
_In_ ULONG NumBytesToRead,
_Out_ PULONG NumBytesRead,
_In_ UCHAR Channel
);
To obtain a pointer to the system-supplied PPARALLEL_READ callback, a kernel-mode driver uses an IOCTL_INTERNAL_PARCLASS_CONNECT request, which returns a PARCLASS_INFORMATION structure. The ParallelRead member of the PARCLASS_INFORMATION structure is a pointer to this callback.
A client can only use this routine if it has a lock on a parallel port. A client obtains a lock on a parallel port by using an IOCTL_INTERNAL_LOCK_PORT request.
The PPARALLEL_READ callback runs in the caller's thread at the IRQL of the caller.