Description:
This function allows applications to register for notification of events about printers. This function may be used for job accounting purposes or by printer drivers to keep aware of the operation of the print subsystem.
#define INCL_SPL
#define INCL_SPLBIDI
#include <os2.h>
PSZ pszComputerName; /* Printer server name to register for alert notification. */
PSZ pszName; /* Case-sensitive name of printer port to register for alerts. */
HWND hwndNotify; /* Window handle to get notify messages. */
ULONG ulCategory; /* Category of alert to register. */
ULONG ulType; /* Type of alert to enable for the given category. */
PULONG pulHandle; /* Pointer to spooler alert handle. */
ULONG rc; /* Return codes. */
rc = SplRegister(pszComputerName, pszName,
hwndNotify, ulCategory, ulType, pulHandle);