Jump to content

SplGetControlPanelList

From EDM2
Revision as of 03:59, 12 December 2019 by Martini (talk | contribs) (Created page with "This function queries installed control panel DLLs for support for the printer attached to the given port. == Syntax == SplGetControlPanelList(pszComputerName, pszP...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

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


#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);

Remarks

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