SplQueryControlPanel
Appearance
This function queries a specific control panel DLL for support for the printer attached to the given port.
Syntax
SplQueryControlPanel(pszComputerName, pszPortName, pszDeviceID, pszControlPanel, flCapabilities, pulOptions)
Parameters
- pszComputerName (PSZ) - input
- Name of computer connected to the printer port.
- This parameter is NULL for printers whose port exists on the current machine.
- pszPortName (PSZ) - input
- Printer port name.
- The name of the printer port in pszComputerName used to determine if a control panel can be displayed. Following is an example of a port name: LPT1
- This will be a locally defined port name.
- pszDeviceID (PSZ) - input
- Device ID, if known, for the printer connected to pszPortName.
- pszControlPanel (PSZ) - input
- Name of control panel to call to query support for this printer.
- This name can be one of the following:
- The name registered with SplRegisterControlPanel
- One of the control panel names returned by SplGetControlPanelList
- This parameter can be used to determine the type of support given by a control panel in the list.
- flCapabilities (ULONG) - input
- Capabilities requested.
- FL_ADMIN - 0x00000001: Set if an administrator wants the control panel.
- pulOptions (PULONG) - output
- Option value returned by the control panel DLL.
- Values are as follows:
- OPT_CUSTOM(2) A control panel for the specific device is available.
- OPT_GENERIC(1) A generic control panel can be displayed for the printer.
Returns
- rc (ULONG) - returns
- Return codes.
- 0 Success
- ERROR_INVALID_NAME(123) pszName is not the name of a control panel DLL.
- ERROR_NOT_SUPPORTED(50) A control panel for this printer is not supported by the called control panel DLL.