Jump to content

SplPdTermPort: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
SplPdTermPort terminates a port on behalf of the spooler.  
SplPdTermPort terminates a port on behalf of the spooler.


== Syntax ==  
== Syntax ==
  SplPdTermPort(hfile, pszPortName);
  SplPdTermPort(hfile, pszPortName)


== Parameters ==
== Parameters ==
; hfile ([[HFILE]]) - input  
; hfile ([[HFILE]]) - input: The handle to an open file.
: The handle to an open file.  
; pszPortName ([[PSZ]]) - input: The name of the port to be terminated (closed).
 
; pszPortName ([[PSZ]]) - input  
: The name of the port to be terminated (closed).


== Returns ==
== Returns ==
; rc (APIERR) - returns : Return codes.  
; rc ([[APIERR]]) - returns : Return codes.
 
This handling routine returns the following errors:
* ERROR_INVALID_PARAMETER
* NO_ERROR


This handling routine returns the following errors:
* ERROR_INVALID_PARAMETER
* NO_ERROR


== Sample ==
== Sample ==
Line 31: Line 27:


== Remarks ==
== 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.  
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.  
This function is called from the spooler function, PrtClose, to start port close down. Note that PrtClose then issues a DosClose.


[[Category:Spl]]
[[Category:Spl]]

Latest revision as of 19:49, 2 July 2023

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.