SplPdTermPort

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

 * 1) include 

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.