Jump to content

SplPdTermPort

From EDM2
Revision as of 19:49, 2 July 2023 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SplPdTermPort terminates a port on behalf of the spooler.

Syntax

SplPdTermPort(hfile, pszPortName)

Parameters

hfile (HFILE) - input
The handle to an open file.
pszPortName (PSZ) - input
The name of the port to be terminated (closed).

Returns

rc (APIERR) - returns
Return codes.

This handling routine returns the following errors:

  • ERROR_INVALID_PARAMETER
  • NO_ERROR

Sample

#include <os2.h>

HFILE     hfile;        /*  The handle to an open file. */
PSZ       pszPortName;  /*  The name of the port to be terminated (closed). */
APIERR    rc;           /*  Return codes. */

rc = SplPdTermPort(hfile, pszPortName);

Remarks

The port driver reads the termination data from the INI file, interprets the data, and issues the appropriate DosDevIOCtls to the open port given by the file handle.

This function is called from the spooler function, PrtClose, to start port close down. Note that PrtClose then issues a DosClose.