This function retrieves information about a print device.
#define INCL_SPL /* Or use INCL_PM, */
#include <os2.h>
PSZ pszComputerName; /* Name of computer where print device is to be queried. */
PSZ pszPrintDeviceName; /* Name of Print Device. */
ULONG ulLevel; /* Level of detail required. */
PVOID pBuf; /* Buffer. */
ULONG cbBuf; /* Size, in bytes, of Buffer. */
PULONG pcbNeeded; /* Size in bytes of available information. */
SPLERR rc; /* Return code. */
rc = SplQueryDevice(pszComputerName, pszPrintDeviceName,
ulLevel, pBuf, cbBuf, pcbNeeded);