Jump to content

SplPdRemovePort: Difference between revisions

From EDM2
Created page with "SplPdRemovePort tells the port driver the name of the port that needs to be removed. == Syntax == SplPdRemovePort(hab, pszPortName); == Parameters == ; hab (HAB) - input ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
SplPdRemovePort tells the port driver the name of the port that needs to be removed.  
SplPdRemovePort tells the port driver the name of the port that needs to be removed.


== Syntax ==  
== Syntax ==
  SplPdRemovePort(hab, pszPortName);
  SplPdRemovePort(hab, pszPortName)


== Parameters ==
== Parameters ==
; hab (HAB) - input : The handle to anchor block.  
; hab (HAB) - input : The handle to anchor block.
 
; pszPortName (PSZ) - input : The name of the port to be removed.
; pszPortName (PSZ) - input : The name of the port to be removed.  


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


Line 25: Line 23:


rc = SplPdRemovePort(hab, pszPortName);
rc = SplPdRemovePort(hab, pszPortName);
</pre>
</pre>


== Remarks ==
== Remarks ==
This function is called from the Workplace Shell and allows the port driver to remove its data from the INI file.  
This function is called from the Workplace Shell and allows the port driver to remove its data from the INI file.


The port driver must remove the printer port from the system INI file by removing ApplicationName "PM_SPOOLER_PORT" and KeyName "pszPortName". The port driver should also remove its own data for this port from the system INI file by removing ApplicationName "PM_<pszPortName>", where "pszPortName" is the designation of the port in question.  
The port driver must remove the printer port from the system INI file by removing ApplicationName "PM_SPOOLER_PORT" and KeyName "pszPortName". The port driver should also remove its own data for this port from the system INI file by removing ApplicationName "PM_<pszPortName>", where "pszPortName" is the designation of the port in question.


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

Latest revision as of 19:50, 2 July 2023

SplPdRemovePort tells the port driver the name of the port that needs to be removed.

Syntax

SplPdRemovePort(hab, pszPortName)

Parameters

hab (HAB) - input
The handle to anchor block.
pszPortName (PSZ) - input
The name of the port to be removed.

Returns

rc (APIERR) - returns
Return codes.

This handling routine returns the following errors:

  • ERROR_INVALID_PARAMETER
  • NO_ERROR

Sample

#include <os2.h>

HAB       hab;          /*  The handle to anchor block. */
PSZ       pszPortName;  /*  The name of the port to be removed. */
APIERR    rc;           /*  Return codes. */

rc = SplPdRemovePort(hab, pszPortName);

Remarks

This function is called from the Workplace Shell and allows the port driver to remove its data from the INI file.

The port driver must remove the printer port from the system INI file by removing ApplicationName "PM_SPOOLER_PORT" and KeyName "pszPortName". The port driver should also remove its own data for this port from the system INI file by removing ApplicationName "PM_<pszPortName>", where "pszPortName" is the designation of the port in question.