Skip to content

Latest commit

 

History

History
134 lines (99 loc) · 3.53 KB

nc-parallel-pparallel_write.md

File metadata and controls

134 lines (99 loc) · 3.53 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_WRITE
PPARALLEL_WRITE (parallel.h)
The PPARALLEL_WRITE-typed callback routine writes data to a parallel device. The system-supplied bus driver for parallel ports supplies this routine.
parports\pparallel_write.htm
parports
02/15/2018
PPARALLEL_WRITE callback
PPARALLEL_WRITE, PPARALLEL_WRITE function pointer [Parallel Ports], cisspd_c9bcb3ed-ca6a-44d7-8952-f96f76490262.xml, parallel/PPARALLEL_WRITE, parports.pparallel_write
parallel.h
Parallel.h
Desktop
Windows
RILGBATOKEN, *LPRILGBATOKEN
PPARALLEL_WRITE
parallel/PPARALLEL_WRITE
APIRef
kbSyntax
UserDefined
parallel.h
PPARALLEL_WRITE

PPARALLEL_WRITE callback

-description

The PPARALLEL_WRITE-typed callback routine writes data to 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 [in]

Pointer to a caller-allocated write buffer.

-param NumBytesToWrite [in]

Specifies the number of bytes to copy from the write buffer to the parallel device. Must be less than or equal to the number of bytes in the caller-allocated write buffer.

-param NumBytesWritten [out]

Specifies the number of bytes that were actually copied from the caller-allocated write buffer to the parallel device.

-param Channel [in]

Not used.

-returns

Return code Description
STATUS_SUCCESS
The caller-supplied data was successfully transferred to the device.
STATUS_Xxx
An internal operation resulted in an NTSTATUS error.

-prototype

typedef NTSTATUS ( *PPARALLEL_WRITE)(
  _In_  PVOID  Context,
  _In_  PVOID  Buffer,
  _In_  ULONG  NumBytesToWrite,
  _Out_ PULONG NumBytesWritten,
  _In_  UCHAR  Channel
);

-remarks

To obtain a pointer to the system-supplied PPARALLEL_WRITE callback, a kernel-mode driver uses an IOCTL_INTERNAL_PARCLASS_CONNECT request, which returns a PARCLASS_INFORMATION structure. The ParallelWrite 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_WRITE callback runs in the caller's thread at the IRQL of the caller.

-see-also

PPARALLEL_READ

IOCTL_INTERNAL_LOCK_PORT