PPARALLEL_WRITE callback function (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.
Syntax
PPARALLEL_WRITE PparallelWrite;
NTSTATUS PparallelWrite(
[in] PVOID Context,
[in] PVOID Buffer,
[in] ULONG NumBytesToWrite,
[out] PULONG NumBytesWritten,
[in] UCHAR Channel
)
{...}
Parameters
[in] Context
Pointer to the device extension of a parallel device's physical device object (PDO).
[in] Buffer
Pointer to a caller-allocated write buffer.
[in] NumBytesToWrite
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.
[out] NumBytesWritten
Specifies the number of bytes that were actually copied from the caller-allocated write buffer to the parallel device.
[in] Channel
Not used.
Return value
Return code | Description |
---|---|
|
The caller-supplied data was successfully transferred to the device. |
|
An internal operation resulted in an NTSTATUS error. |
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.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | parallel.h (include Parallel.h) |