Skip to content

Latest commit

 

History

History
134 lines (99 loc) · 3.47 KB

nc-parallel-pparallel_read.md

File metadata and controls

134 lines (99 loc) · 3.47 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NC:parallel.PPARALLEL_READ
PPARALLEL_READ (parallel.h)
The PPARALLEL_READ-typed callback routine reads data from a parallel device. The system-supplied bus driver for parallel ports supplies this routine.
parports\pparallel_read.htm
parports
02/15/2018
PPARALLEL_READ callback
PPARALLEL_READ, PPARALLEL_READ function pointer [Parallel Ports], cisspd_ae27b566-d561-4bc8-9519-fc3c35069791.xml, parallel/PPARALLEL_READ, parports.pparallel_read
parallel.h
Parallel.h
Desktop
Windows
RILGBATOKEN, *LPRILGBATOKEN
PPARALLEL_READ
parallel/PPARALLEL_READ
APIRef
kbSyntax
UserDefined
parallel.h
PPARALLEL_READ

PPARALLEL_READ callback

-description

The PPARALLEL_READ-typed callback routine reads data from a parallel device. The system-supplied bus driver for parallel ports supplies this routine.

-parameters

-param Context [in]

Pointer to the device extension of a parallel device's physical device object (PDO).

-param Buffer [out]

Pointer to a read buffer that the caller allocates.

-param 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.

-param NumBytesRead [out]

Specifies the number of bytes that were actually read from the parallel device and saved in the caller-allocated read buffer.

-param Channel [in]

Not used.

-returns

Return code Description
STATUS_SUCCESS
The requested data was successfully transferred from the device.
STATUS_Xxx
An internal operation resulted in an NTSTATUS error.

-prototype

typedef NTSTATUS ( *PPARALLEL_READ)(
  _In_  PVOID  Context,
  _Out_ PVOID  Buffer,
  _In_  ULONG  NumBytesToRead,
  _Out_ PULONG NumBytesRead,
  _In_  UCHAR  Channel
);

-remarks

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.

-see-also

PPARALLEL_WRITE

IOCTL_INTERNAL_LOCK_PORT