Jump to content

SplPdRemovePort

From EDM2
Revision as of 00:34, 12 December 2019 by Martini (talk | contribs) (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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.