Jump to content

SplGetControlPanelList: Difference between revisions

From EDM2
Created page with "This function queries installed control panel DLLs for support for the printer attached to the given port. == Syntax == SplGetControlPanelList(pszComputerName, pszP..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This function queries installed control panel DLLs for support for the printer attached to the given port.  
This function queries installed control panel DLLs for support for the printer attached to the given port.


== Syntax ==  
== Syntax ==  
  SplGetControlPanelList(pszComputerName,
  SplGetControlPanelList(pszComputerName, pszPortName, pszDeviceID, flCapabilities,
      pszPortName, pszDeviceID, flCapabilities,
                        pszListOfPanels, cbBuf, pcbNeeded)
      pszListOfPanels, cbBuf, pcbNeeded);


== Parameters ==
== Parameters ==
; pszComputerName (PSZ) - input  
;pszComputerName (PSZ) - input: Name of computer connected to the printer port.
: Name of computer connected to the printer port.  
:This is NULL for printers whose port exists on the current machine.
;pszPortName (PSZ) - input: Name of printer port on pszComputerName used to determine if a control panel can be displayed.
;pszDeviceID (PSZ) - input: Device ID, if known, for the printer connected to pszPortName.
;flCapabilities (ULONG) - input: Compatibilities requested.
:FL_ADMIN - 0x00000001 - Set if an administrator wants the control panel.
;pszListOfPanels (PSZ) - output: Receives comma-separated list of control panel names capable of displaying a control panel for the printer.
;cbBuf (ULONG) - input: Length of buffer, in bytes, pointed to by pszListOfPanels.
;pcbNeeded (PULONG) - output: Receives length, in bytes, of buffer needed to store entire list of control panels for the printer.


: This is NULL for printers whose port exists on the current machine.
;rc (ULONG) - returns : Return codes.
 
::0 Success  
; pszPortName (PSZ) - input
::ERROR_NOT_SUPPORTED(50) A control panel for this printer is not supported by any control panel DLL.
: Name of printer port on pszComputerName used to determine if a control panel can be displayed.
::NERR_BufTooSmall(2123) Need to call again with a bigger buffer.
 
; pszDeviceID (PSZ) - input
: Device ID, if known, for the printer connected to pszPortName.
 
; flCapabilities (ULONG) - input
: Compatibilities requested.
 
:;FL_ADMIN - 0x00000001
::Set if an administrator wants the control panel.
 
; pszListOfPanels (PSZ) - output
: Receives comma-separated list of control panel names capable of displaying a control panel for the printer.
 
; cbBuf (ULONG) - input
: Length of buffer, in bytes, pointed to by pszListOfPanels.
 
; pcbNeeded (PULONG) - output
: Receives length, in bytes, of buffer needed to store entire list of control panels for the printer.
 
== Returns ==
; rc (ULONG) - returns : Return codes.  
 
* 0 Success  
* ERROR_NOT_SUPPORTED(50)  
: A control panel for this printer is not supported by any control panel DLL.  
* NERR_BufTooSmall(2123)  
: Need to call again with a bigger buffer.  
 
 
== Sample ==
<pre>
 
#define INCL_SPL
#define INCL_SPLBIDI
#include <os2.h>
 
PSZ      pszComputerName;  /*  Name of computer connected to the printer port. */
PSZ      pszPortName;      /*  Name of printer port on pszComputerName used to determine if a control panel can be displayed. */
PSZ      pszDeviceID;      /*  Device ID, if known, for the printer connected to pszPortName. */
ULONG    flCapabilities;  /*  Compatibilities requested. */
PSZ      pszListOfPanels;  /*  Receives comma-separated list of control panel names capable of displaying a control panel for the printer. */
ULONG    cbBuf;            /*  Length of buffer, in bytes, pointed to by pszListOfPanels. */
PULONG    pcbNeeded;        /*  Receives length, in bytes, of buffer needed to store entire list of control panels for the printer. */
ULONG    rc;              /*  Return codes. */
 
rc = SplGetControlPanelList(pszComputerName,
      pszPortName, pszDeviceID, flCapabilities,
      pszListOfPanels, cbBuf, pcbNeeded);
</pre>


== Remarks ==
== Remarks ==
This function will return Success only for printers that are configured to communicate bidirectionally.  
This function will return Success only for printers that are configured to communicate bidirectionally.


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

Latest revision as of 18:17, 6 March 2020

This function queries installed control panel DLLs for support for the printer attached to the given port.

Syntax

SplGetControlPanelList(pszComputerName, pszPortName, pszDeviceID, flCapabilities,
                       pszListOfPanels, cbBuf, pcbNeeded)

Parameters

pszComputerName (PSZ) - input
Name of computer connected to the printer port.
This is NULL for printers whose port exists on the current machine.
pszPortName (PSZ) - input
Name of printer port on pszComputerName used to determine if a control panel can be displayed.
pszDeviceID (PSZ) - input
Device ID, if known, for the printer connected to pszPortName.
flCapabilities (ULONG) - input
Compatibilities requested.
FL_ADMIN - 0x00000001 - Set if an administrator wants the control panel.
pszListOfPanels (PSZ) - output
Receives comma-separated list of control panel names capable of displaying a control panel for the printer.
cbBuf (ULONG) - input
Length of buffer, in bytes, pointed to by pszListOfPanels.
pcbNeeded (PULONG) - output
Receives length, in bytes, of buffer needed to store entire list of control panels for the printer.
rc (ULONG) - returns
Return codes.
0 Success
ERROR_NOT_SUPPORTED(50) A control panel for this printer is not supported by any control panel DLL.
NERR_BufTooSmall(2123) Need to call again with a bigger buffer.

Remarks

This function will return Success only for printers that are configured to communicate bidirectionally.