Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The PNEGOTIATE_IEEE_MODE-typed callback routine selects the fastest forward and reverse protocols that the system-supplied bus driver for parallel ports supports from among those specified by the caller. The system-supplied bus driver for parallel ports supplies this routine.
Syntax
PNEGOTIATE_IEEE_MODE PnegotiateIeeeMode;
NTSTATUS PnegotiateIeeeMode(
[in] PVOID Context,
[in] USHORT ModeMaskFwd,
[in] USHORT ModeMaskRev,
[in] PARALLEL_SAFETY ModeSafety,
[in] BOOLEAN IsForward
)
{...}
Parameters
[in] Context
Pointer to the device extension of a parallel device's physical device object (PDO).
[in] ModeMaskFwd
Specifies the forward protocols. ModeMaskFwd is a bitwise OR of the constants that represent the protocols that the parallel port bus driver supports. For the forward and reverse protocol values, see the protocol constants defined in ntddpar.h (from NONE to ECP_ANY).
[in] ModeMaskRev
Specifies the reverse protocols. ModeMaskRev is a bitwise OR of the constants that represent the protocols that the parallel port bus driver supports.
[in] ModeSafety
Specifies the safety mode. Must be set to the SAFE_MODE enumeration value of the PARALLEL_SAFETY enumeration type:
typedef enum {
SAFE_MODE,
UNSAFE_MODE
} PARALLEL_SAFETY;
[in] IsForward
Specifies whether to connect the forward or the reverse protocol that the routine negotiates. If IsForward is TRUE, the forward protocol is connected. Otherwise, the reverse protocol is connected.
Return value
| Return code | Description |
|---|---|
| STATUS_SUCCESSFUL | The IEEE mode was successfully negotiated. |
| STATUS_DEVICE_PROTOCOL_ERROR | An IEEE mode is already set on the device. |
| STATUS_Xxx | An internal operation resulted in an NTSTATUS error. |
Remarks
To obtain a pointer to the system-supplied PNEGOTIATE_IEEE_MODE callback, a kernel-mode driver uses an IOCTL_INTERNAL_PARCLASS_CONNECT request, which returns a PARCLASS_INFORMATION structure. The NegotiateIeeeMode member of the PARCLASS_INFORMATION structure is a pointer to this callback.
The PNEGOTIATE_IEEE_MODE 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) |