Jump to content

SplPdRemoteSetPort: Difference between revisions

From EDM2
Created page with "SplPdRemoteSetPort is an API exported by a port driver. It is called by the network print object to display a dialog to an administrator that allows configuration of a server'..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
SplPdRemoteSetPort is an API exported by a port driver. It is called by the network print object to display a dialog to an administrator that allows configuration of a server's printer port from a client machine.  
SplPdRemoteSetPort is an API exported by a port driver. It is called by the network print object to display a dialog to an administrator that allows configuration of a server's printer port from a client machine.


== Syntax ==  
== Syntax ==
  SplPdRemoteSetPort(hab, pszComputerName, pszPortName, pflCapabilities);
  SplPdRemoteSetPort(hab, pszComputerName, pszPortName, pflCapabilities)


== Parameters ==
== Parameters ==
; hab ([[HAB]]) - input : Anchor block handle.  
; hab ([[HAB]]) - input : Anchor block handle.
 
; pszComputerName ([[PSZ]]) - input : Name of print server being configured.
; pszComputerName ([[PSZ]]) - input : Name of print server being configured.  
; pszPortName (PSZ) - input : Name of printer port to configure on print server.
 
: Following is an example of a port name: LPT1
; pszPortName (PSZ) - input : Name of printer port to configure on print server.  
; pflCapabilities ([[PULONG]]) - input : Pointer to a flag field.
 
: Value is as follows:
: Following is an example of a port name:  
::FL_ADMIN - 0x00000001 :On entry, if this flag is set the administrator wants the remote port settings displayed.
    LPT1
 
; pflCapabilities ([[PULONG]]) - input : Pointer to a flag field.  
: Value is as follows:  
:;FL_ADMIN - 0x00000001  
::On entry, if this flag is set the administrator wants the remote port settings displayed.  


== Returns ==
== Returns ==
; rc (ULONG) - returns : Return codes.  
; rc (ULONG) - returns : Return codes.
* 0 Success  
* 0 Success
* 87(ERROR_INVALID_PARAMETER)  
* 87(ERROR_INVALID_PARAMETER): An invalid parameter was specified; most likely an invalid pszPortName or pflModified was given.
: An invalid parameter was specified; most likely an invalid pszPortName or pflModified was given.  
 


== Sample ==
== Sample ==
Line 38: Line 30:
ULONG    rc;              /*  Return codes. */
ULONG    rc;              /*  Return codes. */


rc = SplPdRemoteSetPort(hab, pszComputerName,
rc = SplPdRemoteSetPort(hab, pszComputerName, pszPortName, pflCapabilities);
      pszPortName, pflCapabilities);
</pre>
</pre>


== Remarks ==
== Remarks ==
This optional API uses BIDI_Q_PORTDRV to get the current configuration parameters for the print server's port driver. These parameters are used to generate the port setup dialog box.  
This optional API uses BIDI_Q_PORTDRV to get the current configuration parameters for the print server's port driver. These parameters are used to generate the port setup dialog box.


The port driver entry for this routine should not assume that the port driver is installed on this client machine. For instance, if the port driver is not installed on the client and the port driver module is available on the network, the print object can load and call the port driver at this entry point.  
The port driver entry for this routine should not assume that the port driver is installed on this client machine. For instance, if the port driver is not installed on the client and the port driver module is available on the network, the print object can load and call the port driver at this entry point.


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

Latest revision as of 19:48, 2 July 2023

SplPdRemoteSetPort is an API exported by a port driver. It is called by the network print object to display a dialog to an administrator that allows configuration of a server's printer port from a client machine.

Syntax

SplPdRemoteSetPort(hab, pszComputerName, pszPortName, pflCapabilities)

Parameters

hab (HAB) - input
Anchor block handle.
pszComputerName (PSZ) - input
Name of print server being configured.
pszPortName (PSZ) - input
Name of printer port to configure on print server.
Following is an example of a port name: LPT1
pflCapabilities (PULONG) - input
Pointer to a flag field.
Value is as follows:
FL_ADMIN - 0x00000001 :On entry, if this flag is set the administrator wants the remote port settings displayed.

Returns

rc (ULONG) - returns
Return codes.
  • 0 Success
  • 87(ERROR_INVALID_PARAMETER): An invalid parameter was specified; most likely an invalid pszPortName or pflModified was given.

Sample

#define INCL_SPL
#define INCL_SPLBIDI
#include <os2.h>

HAB       hab;              /*  Anchor block handle. */
PSZ       pszComputerName;  /*  Name of print server being configured. */
PSZ       pszPortName;      /*  Name of printer port to configure on print server. */
PULONG    pflCapabilities;  /*  Pointer to a flag field. */
ULONG     rc;               /*  Return codes. */

rc = SplPdRemoteSetPort(hab, pszComputerName, pszPortName, pflCapabilities);

Remarks

This optional API uses BIDI_Q_PORTDRV to get the current configuration parameters for the print server's port driver. These parameters are used to generate the port setup dialog box.

The port driver entry for this routine should not assume that the port driver is installed on this client machine. For instance, if the port driver is not installed on the client and the port driver module is available on the network, the print object can load and call the port driver at this entry point.