SplRegisterControlPanel: Difference between revisions
Appearance
Created page with "This function registers a DLL with the spooler that can display a control panel for printers. By default, all protocol converters will be checked for control panel support, so..." |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
This function registers a DLL with the spooler that can display a control panel for printers. By default, all protocol converters will be checked for control panel support, so converters must not register themselves using this API. | This function registers a DLL with the spooler that can display a control panel for printers. By default, all protocol converters will be checked for control panel support, so converters must not register themselves using this API. | ||
== Syntax == | == Syntax == | ||
SplRegisterControlPanel(pszName, pszDllPath, ulFlags, pszReserved, ulVersion) | SplRegisterControlPanel(pszName, pszDllPath, ulFlags, pszReserved, ulVersion) | ||
== Parameters == | == Parameters == | ||
;pszName (PSZ) - input | ;pszName (PSZ) - input:Name of control panel. | ||
:Name of control panel. | :This name must not conflict with any installed protocol converter name or control panel name. | ||
;pszDllPath (PSZ) - input:Fully qualified path to the DLL that exports the control panel APIs. | |||
:This name must not conflict with any installed protocol converter name or control panel name. | ;ulFlags (ULONG) - input:Must be 0 (zero). | ||
;pszReserved (PSZ) - input:Must be NULL. | |||
;pszDllPath (PSZ) - input | ;ulVersion (ULONG) - input:Must be 0 (zero). | ||
:Fully qualified path to the DLL that exports the control panel APIs. | |||
;ulFlags (ULONG) - input | |||
:Must be 0 (zero). | |||
;pszReserved (PSZ) - input | |||
:Must be NULL. | |||
;ulVersion (ULONG) - input | |||
:Must be 0 (zero). | |||
== Returns == | == Returns == | ||
;rc (ULONG) - returns : Return codes. | ;rc (ULONG) - returns : Return codes. | ||
* 0 Success | *0 Success | ||
*ERROR_INVALID_LEVEL(124) :ulVersion not 0. | |||
*ERROR_INVALID_LEVEL(124) | *ERROR_INVALID_NAME(123) :pszName is already used by a protocol converter or another control panel DLL. | ||
:ulVersion not 0. | *ERROR_INVALID_PARAMETER(87) :ulFlags not 0 or invalid parameter given. | ||
*ERROR_MOD_NOT_FOUND(126) :Invalid path to DLL. | |||
*ERROR_INVALID_NAME(123) | *ERROR_PROC_NOT_FOUND(127) :pszDllPath does not export the two APIs for control panels ([[SplQueryControlPanel]] and [[SplDisplayControlPanel]]). | ||
:pszName is already used by a protocol converter or another control panel DLL. | |||
*ERROR_INVALID_PARAMETER(87) | |||
:ulFlags not 0 or invalid parameter given. | |||
*ERROR_MOD_NOT_FOUND(126) | |||
:Invalid path to DLL. | |||
*ERROR_PROC_NOT_FOUND(127) | |||
:pszDllPath does not export the two APIs for control panels ( | |||
== Sample == | == Sample == | ||
Line 56: | Line 36: | ||
rc = SplRegisterControlPanel(pszName, pszDllPath, | rc = SplRegisterControlPanel(pszName, pszDllPath, | ||
ulFlags, pszReserved, ulVersion); | ulFlags, pszReserved, ulVersion); | ||
</pre> | </pre> | ||
== Remarks == | == Remarks == | ||
A control panel need register itself only once; registration is maintained across reboots. | A control panel need register itself only once; registration is maintained across reboots. | ||
[[Category:Spl]] | [[Category:Spl]] |
Latest revision as of 22:02, 25 March 2020
This function registers a DLL with the spooler that can display a control panel for printers. By default, all protocol converters will be checked for control panel support, so converters must not register themselves using this API.
Syntax
SplRegisterControlPanel(pszName, pszDllPath, ulFlags, pszReserved, ulVersion)
Parameters
- pszName (PSZ) - input
- Name of control panel.
- This name must not conflict with any installed protocol converter name or control panel name.
- pszDllPath (PSZ) - input
- Fully qualified path to the DLL that exports the control panel APIs.
- ulFlags (ULONG) - input
- Must be 0 (zero).
- pszReserved (PSZ) - input
- Must be NULL.
- ulVersion (ULONG) - input
- Must be 0 (zero).
Returns
- rc (ULONG) - returns
- Return codes.
- 0 Success
- ERROR_INVALID_LEVEL(124) :ulVersion not 0.
- ERROR_INVALID_NAME(123) :pszName is already used by a protocol converter or another control panel DLL.
- ERROR_INVALID_PARAMETER(87) :ulFlags not 0 or invalid parameter given.
- ERROR_MOD_NOT_FOUND(126) :Invalid path to DLL.
- ERROR_PROC_NOT_FOUND(127) :pszDllPath does not export the two APIs for control panels (SplQueryControlPanel and SplDisplayControlPanel).
Sample
#define INCL_SPL #define INCL_SPLBIDI #include <os2.h> PSZ pszName; /* Name of control panel. */ PSZ pszDllPath; /* Fully qualified path to the DLL that exports the control panel APIs. */ ULONG ulFlags; /* Must be 0 (zero). */ PSZ pszReserved; /* Must be NULL. */ ULONG ulVersion; /* Must be 0 (zero). */ ULONG rc; /* Return codes. */ rc = SplRegisterControlPanel(pszName, pszDllPath, ulFlags, pszReserved, ulVersion);
Remarks
A control panel need register itself only once; registration is maintained across reboots.