Jump to content

SplDeletePort: Difference between revisions

From EDM2
Created page with "This function is called to remove a printer port. ; Note: There is currently no support for using this API to remotely remove a printer port. == Syntax == SplDeletePort(..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
This function is called to remove a printer port.  
This function is called to remove a printer port.


; Note: There is currently no support for using this API to remotely remove a printer port.  
;Note: There is currently no support for using this API to remotely remove a printer port.


== Syntax ==  
== Syntax ==  
  SplDeletePort(pszComputerName, pszPortName);
  SplDeletePort(pszComputerName, pszPortName)


== Parameters ==
== Parameters ==
; pszComputerName (PSZ) - input  
;pszComputerName (PSZ) - input: Name of computer where port is to be removed.
: Name of computer where port is to be removed.  
:A NULL string identifies the local workstation. This currently must be NULL.
;pszPortName (PSZ) - input: Name of printer port to remove.
: This can be a virtual port name. Following is an example of a port name:<tt>LPT5</tt>
:;Note:This port cannot be removed if it is referenced by a print device.


:A NULL string identifies the local workstation. This currently must be NULL.
;rc (ULONG) - returns : Return codes.
 
::0 Success
; pszPortName (PSZ) - input
::50 ERROR_NOT_SUPPORTED - pszComputerName is not supported.
: Name of printer port to remove.
::87 ERROR_INVALID_PARAMETER - An invalid buffer was given.
 
::99 ERROR_DEVICE_IN_USE - Port name is connected to a print queue.
: This can be a virtual port name. Following is an example of a port name:
  LPT5
 
:;Note
::This port cannot be removed if it is referenced by a print device.
 
== Returns ==
; rc (ULONG) - returns : Return codes.  
* 0 Success  
 
:;ERROR_DEVICE_IN_USE(99)
::Port name is connected to a print queue.  
 
:;ERROR_INVALID_PARAMETER(87)
::An invalid buffer was given.  
 
:;ERROR_NOT_SUPPORTED(50)
::pszComputerName is not supported.
 
== Sample ==
<pre>
#define INCL_SPL
#define INCL_SPLBIDI
#include <os2.h>
 
PSZ      pszComputerName;  /*  Name of computer where port is to be removed. */
PSZ      pszPortName;      /*  Name of printer port to remove. */
ULONG    rc;              /*  Return codes. */
 
rc = SplDeletePort(pszComputerName, pszPortName);
</pre>


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

Revision as of 14:23, 13 December 2019

This function is called to remove a printer port.

Note
There is currently no support for using this API to remotely remove a printer port.

Syntax

SplDeletePort(pszComputerName, pszPortName)

Parameters

pszComputerName (PSZ) - input
Name of computer where port is to be removed.
A NULL string identifies the local workstation. This currently must be NULL.
pszPortName (PSZ) - input
Name of printer port to remove.
This can be a virtual port name. Following is an example of a port name:LPT5
Note
This port cannot be removed if it is referenced by a print device.
rc (ULONG) - returns
Return codes.
0 Success
50 ERROR_NOT_SUPPORTED - pszComputerName is not supported.
87 ERROR_INVALID_PARAMETER - An invalid buffer was given.
99 ERROR_DEVICE_IN_USE - Port name is connected to a print queue.