Поделиться через


SetPortTimeOuts function pointer

A port monitor server DLL's SetPortTimeOuts function sets port time-out values for an open port.

Syntax

typedef BOOL ( WINAPI *pfnSetPortTimeOuts)(
  _In_ HANDLE         hPort,
  _In_ LPCOMMTIMEOUTS lpCTO,
  _In_ DWORD          reserved
);

Parameters

  • hPort [in]
    Caller-supplied handle to the open port on which to set the time-out values.

  • lpCTO [in]
    Caller-supplied pointer to a COMMTIMEOUTS structure (described in the Microsoft Windows SDK documentation).

  • reserved [in]
    Reserved for future use. Must be set to zero.

Return value

If the operation succeeds, the function should return TRUE. Otherwise it should return FALSE.

Remarks

A port monitor server DLL's SetPortTimeOuts function allows a language monitor to specify port time-out values for an open port. The function is optional, and must be provided only if the port monitor controls a port that allows the modification of port time-out values. If the function is defined, its address must be included in a MONITOR2 structure.

The function is called by pjlmon.dll, the sample language monitor, and you can write a customized language monitor that calls it. The print spooler does not call SetPortTimeOuts.

The port monitor should initialize the port's time-out values from within its OpenPort function.

Requirements

Target platform

Desktop

Header

Winsplp.h (include Winsplp.h)

See also

MONITOR2

OpenPort

 

 

Send comments about this topic to Microsoft