| 1 | /****************************** Module Header ******************************\
|
|---|
| 2 | *
|
|---|
| 3 | * Module Name: PMSPLnew.H
|
|---|
| 4 | *
|
|---|
| 5 | * OS/2 Presentation Manager Spooler constants, types and function declarations
|
|---|
| 6 | *
|
|---|
| 7 | * Copyright (c) International Business Machines Corporation 1981, 1988-1993
|
|---|
| 8 | *
|
|---|
| 9 | * ===========================================================================
|
|---|
| 10 | *
|
|---|
| 11 | * The following symbols are used in this file for conditional sections.
|
|---|
| 12 | *
|
|---|
| 13 | * #define: To include:
|
|---|
| 14 | *
|
|---|
| 15 | * INCL_SPLERRORS defined if INCL_ERRORS defined
|
|---|
| 16 | * INCL_SPLFSE file system emulation calls
|
|---|
| 17 | * INCL_SPLDOSPRINT DosPrint APIs
|
|---|
| 18 | *
|
|---|
| 19 | * ===========================================================================
|
|---|
| 20 | *
|
|---|
| 21 | * Comments at the end of each typedef line give the name tags used in
|
|---|
| 22 | * the assembler include version of this file.
|
|---|
| 23 | *
|
|---|
| 24 | * The assembler include version of this file excludes lines between XLATOFF
|
|---|
| 25 | * and XLATON comments.
|
|---|
| 26 | *
|
|---|
| 27 | \***************************************************************************/
|
|---|
| 28 |
|
|---|
| 29 | #ifndef PMSPLNEWH
|
|---|
| 30 | #define PMSPLNEWH
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 | /*
|
|---|
| 34 | * Spooler post-spool and bidirectional communications APIs
|
|---|
| 35 | */
|
|---|
| 36 | ULONG APIENTRY PrtAbortDoc ( HFILE hFile,
|
|---|
| 37 | PVOID pchData,
|
|---|
| 38 | ULONG cbData,
|
|---|
| 39 | ULONG ulFlags );
|
|---|
| 40 | ULONG APIENTRY PrtResetAbort ( HFILE hFile );
|
|---|
| 41 | ULONG APIENTRY PrtNewPage ( HFILE hFile,
|
|---|
| 42 | ULONG ulPageNumber );
|
|---|
| 43 | ULONG APIENTRY PrtQuery ( PSZ pszComputerName,
|
|---|
| 44 | PSZ pszDeviceName,
|
|---|
| 45 | ULONG ulType,
|
|---|
| 46 | ULONG ulCommand,
|
|---|
| 47 | PVOID pInData,
|
|---|
| 48 | ULONG cbInData,
|
|---|
| 49 | PVOID pOutData,
|
|---|
| 50 | PULONG pcbOutData );
|
|---|
| 51 | ULONG APIENTRY PrtSet ( PSZ pszComputerName,
|
|---|
| 52 | PSZ pszDeviceName,
|
|---|
| 53 | ULONG ulType,
|
|---|
| 54 | ULONG ulCommand,
|
|---|
| 55 | PVOID pInData,
|
|---|
| 56 | ULONG cbInData );
|
|---|
| 57 |
|
|---|
| 58 | /*
|
|---|
| 59 | * Port driver(.PDR) entry points
|
|---|
| 60 | */
|
|---|
| 61 | ULONG APIENTRY SplPdOpen( PSZ pszPortName,
|
|---|
| 62 | PHFILE phFile,
|
|---|
| 63 | PULONG pDeviceFlags,
|
|---|
| 64 | PVOID pPrtOpenStruct);
|
|---|
| 65 | ULONG APIENTRY SplPdWrite( HFILE hDevice,
|
|---|
| 66 | PVOID pchData,
|
|---|
| 67 | ULONG cbData,
|
|---|
| 68 | PULONG pcbWritten );
|
|---|
| 69 | ULONG APIENTRY SplPdAbortDoc( HFILE hDevice,
|
|---|
| 70 | PVOID pchData,
|
|---|
| 71 | ULONG cbData,
|
|---|
| 72 | ULONG ulFlags );
|
|---|
| 73 | ULONG APIENTRY SplPdResetAbort( HFILE hDevice );
|
|---|
| 74 | ULONG APIENTRY SplPdNewPage ( HFILE hDevice,
|
|---|
| 75 | ULONG ulPageNumber );
|
|---|
| 76 | ULONG APIENTRY SplPdClose( HFILE hDevice );
|
|---|
| 77 | ULONG APIENTRY SplPdQuery ( PSZ pszPortName,
|
|---|
| 78 | ULONG ulType,
|
|---|
| 79 | ULONG ulCommand,
|
|---|
| 80 | PVOID pInData,
|
|---|
| 81 | ULONG cbInData,
|
|---|
| 82 | PVOID pOutData,
|
|---|
| 83 | PULONG pcbOutData );
|
|---|
| 84 | ULONG APIENTRY SplPdSet ( PSZ pszPortName,
|
|---|
| 85 | ULONG ulType,
|
|---|
| 86 | ULONG ulCommand,
|
|---|
| 87 | PVOID pInData,
|
|---|
| 88 | ULONG cbInData );
|
|---|
| 89 | ULONG APIENTRY SplPdSendCmd( PSZ pszPortName,
|
|---|
| 90 | ULONG flOptions,
|
|---|
| 91 | ULONG ulCommand,
|
|---|
| 92 | PVOID pInData,
|
|---|
| 93 | ULONG cbInData );
|
|---|
| 94 | ULONG APIENTRY SplPdEnumPort ( HAB hab,
|
|---|
| 95 | PVOID pBuf,
|
|---|
| 96 | ULONG cbBuf,
|
|---|
| 97 | PULONG pulReturned,
|
|---|
| 98 | PULONG pulTotal,
|
|---|
| 99 | PULONG pcbRequired );
|
|---|
| 100 | BOOL APIENTRY SplPdGetPortIcon ( HAB hab,
|
|---|
| 101 | PULONG idIcon );
|
|---|
| 102 | ULONG APIENTRY SplPdInstallPort ( HAB hab,
|
|---|
| 103 | PSZ pszPortName );
|
|---|
| 104 | ULONG APIENTRY SplPdRemovePort ( HAB hab,
|
|---|
| 105 | PSZ pszPortName );
|
|---|
| 106 | ULONG APIENTRY SplPdSetPort ( HAB hab,
|
|---|
| 107 | PSZ pszPortName,
|
|---|
| 108 | PULONG flModified );
|
|---|
| 109 | ULONG APIENTRY SplPdRemoteSetPort ( HAB hab,
|
|---|
| 110 | PSZ pszComputerName,
|
|---|
| 111 | PSZ pszPortName,
|
|---|
| 112 | PULONG pflModified );
|
|---|
| 113 |
|
|---|
| 114 |
|
|---|
| 115 | /*
|
|---|
| 116 | * Protocol converter(.CNV) entry points
|
|---|
| 117 | */
|
|---|
| 118 | ULONG APIENTRY SplProtSendCmd( PSZ pszPortName,
|
|---|
| 119 | ULONG ulType,
|
|---|
| 120 | ULONG ulCommand,
|
|---|
| 121 | PFN pfnPdSendCmd,
|
|---|
| 122 | PFN pfnBaseProtSendCmd,
|
|---|
| 123 | PVOID pInData,
|
|---|
| 124 | ULONG cbInData,
|
|---|
| 125 | PVOID pOutData,
|
|---|
| 126 | PULONG pcbOutData );
|
|---|
| 127 | ULONG APIENTRY SplProtXlateCmd( PSZ pszPortName,
|
|---|
| 128 | PFN pfnBaseProtXlateCmd,
|
|---|
| 129 | PVOID pInData,
|
|---|
| 130 | ULONG cbInData,
|
|---|
| 131 | PVOID pAlertInfo,
|
|---|
| 132 | PVOID pOutData,
|
|---|
| 133 | PULONG pcbOutData );
|
|---|
| 134 | ULONG APIENTRY SplProtWrite( HFILE hDevice,
|
|---|
| 135 | PSZ pszDeviceName,
|
|---|
| 136 | PFN pfnPdWrite,
|
|---|
| 137 | PFN pfnBaseProtWrite,
|
|---|
| 138 | PVOID pchData,
|
|---|
| 139 | ULONG cbData,
|
|---|
| 140 | PULONG pcbWritten );
|
|---|
| 141 |
|
|---|
| 142 | /*
|
|---|
| 143 | * Spooler job submission APIs
|
|---|
| 144 | */
|
|---|
| 145 | BOOL APIENTRY SplQmNewPage ( HSPL hspl,
|
|---|
| 146 | ULONG ulPageNumber );
|
|---|
| 147 | ULONG APIENTRY SplQmGetJobID ( HSPL hspl,
|
|---|
| 148 | ULONG ulLevel,
|
|---|
| 149 | PVOID pBuf,
|
|---|
| 150 | ULONG cbBuf,
|
|---|
| 151 | PULONG pcbNeeded );
|
|---|
| 152 |
|
|---|
| 153 | /*
|
|---|
| 154 | * Queue driver(.QPR) entry point
|
|---|
| 155 | */
|
|---|
| 156 | BOOL APIENTRY SplQpPrintSeparator( HPROC hproc,
|
|---|
| 157 | PBYTE pBuf,
|
|---|
| 158 | ULONG cbBuf,
|
|---|
| 159 | ULONG ulFlags );
|
|---|
| 160 |
|
|---|
| 161 | /*
|
|---|
| 162 | * Spooler bidirectional communication APIs
|
|---|
| 163 | */
|
|---|
| 164 | ULONG APIENTRY SplCreatePort(PSZ pszComputerName,
|
|---|
| 165 | PSZ pszPortName,
|
|---|
| 166 | PSZ pszPortDriver,
|
|---|
| 167 | ULONG ulVersion,
|
|---|
| 168 | PVOID pBuf,
|
|---|
| 169 | ULONG cbBuf );
|
|---|
| 170 |
|
|---|
| 171 | ULONG APIENTRY SplDeletePort(PSZ pszComputerName,
|
|---|
| 172 | PSZ pszPortName );
|
|---|
| 173 |
|
|---|
| 174 | #define SPLPORT_VERSION_REGULAR 0
|
|---|
| 175 | #define SPLPORT_VERSION_VIRTUAL 1
|
|---|
| 176 |
|
|---|
| 177 |
|
|---|
| 178 | ULONG APIENTRY SplRegister(PSZ pszComputerName,
|
|---|
| 179 | PSZ pszName,
|
|---|
| 180 | HWND hwndNotify,
|
|---|
| 181 | ULONG ulCategory,
|
|---|
| 182 | ULONG ulType,
|
|---|
| 183 | PULONG pulHandle );
|
|---|
| 184 |
|
|---|
| 185 | ULONG APIENTRY SplUnRegister(PSZ pszComputerName,
|
|---|
| 186 | PSZ pszName,
|
|---|
| 187 | ULONG ulHandle,
|
|---|
| 188 | ULONG ulCategory,
|
|---|
| 189 | ULONG ulType);
|
|---|
| 190 |
|
|---|
| 191 | ULONG APIENTRY SplQueryPath(PSZ pszComputerName,
|
|---|
| 192 | PSZ pszRemoteQueueName,
|
|---|
| 193 | ULONG ulLevel,
|
|---|
| 194 | PVOID pBuf,
|
|---|
| 195 | ULONG cbBuf,
|
|---|
| 196 | PULONG pcbNeeded );
|
|---|
| 197 |
|
|---|
| 198 | ULONG APIENTRY SplQueryPort(PSZ pszComputerName,
|
|---|
| 199 | PSZ pszPortName,
|
|---|
| 200 | ULONG ulLevel,
|
|---|
| 201 | PVOID pBuf,
|
|---|
| 202 | ULONG cbBuf,
|
|---|
| 203 | PULONG pcbNeeded);
|
|---|
| 204 |
|
|---|
| 205 | ULONG APIENTRY SplSetPort(PSZ pszComputerName,
|
|---|
| 206 | PSZ pszPortName,
|
|---|
| 207 | ULONG ulLevel,
|
|---|
| 208 | PVOID pBuf,
|
|---|
| 209 | ULONG cbBuf,
|
|---|
| 210 | ULONG ulParmNum);
|
|---|
| 211 |
|
|---|
| 212 | /*
|
|---|
| 213 | * structure for SplQueryPort/SplEnumPort/SplSetPort Level 2
|
|---|
| 214 | */
|
|---|
| 215 | /*typedef struct _PRPORTINFO2
|
|---|
| 216 | {
|
|---|
| 217 | PSZ pszPortName ;
|
|---|
| 218 | PSZ pszPortDriver ;
|
|---|
| 219 | PSZ pszProtocolConverter ;
|
|---|
| 220 | ULONG ulReserved;
|
|---|
| 221 | ULONG ulMode ;
|
|---|
| 222 | ULONG ulPriority ;
|
|---|
| 223 | } PRPORTINFO2;
|
|---|
| 224 | typedef PRPORTINFO2 *PPRPORTINFO2;*/
|
|---|
| 225 |
|
|---|
| 226 | /*** Values for ulMode in PRPORTINFO2 *************/
|
|---|
| 227 | #define PRPORT_AUTODETECT 1
|
|---|
| 228 | #define PRPORT_DISABLE_BIDI 2
|
|---|
| 229 | #define PRPORT_ENABLE_BIDI 3
|
|---|
| 230 |
|
|---|
| 231 | /*** Values for parmnum in SplSetPort *************/
|
|---|
| 232 | #define PRPO_PORT_DRIVER 1
|
|---|
| 233 | #define PRPO_PROTOCOL_CNV 2
|
|---|
| 234 | #define PRPO_MODE 3
|
|---|
| 235 | #define PRPO_PRIORITY 4
|
|---|
| 236 |
|
|---|
| 237 |
|
|---|
| 238 | ULONG APIENTRY SplAlert(PSZ pszDestComputer,
|
|---|
| 239 | PSZ pszSourceComputer,
|
|---|
| 240 | PSZ pszObjectName,
|
|---|
| 241 | PSZ pszCaption,
|
|---|
| 242 | PSZ pszMsgText,
|
|---|
| 243 | ULONG ulObjectType,
|
|---|
| 244 | ULONG uJobID,
|
|---|
| 245 | ULONG ulAlertType,
|
|---|
| 246 | ULONG ulActionFlags,
|
|---|
| 247 | ULONG ulAlertValue);
|
|---|
| 248 |
|
|---|
| 249 | ULONG APIENTRY SplEnable (PSZ pszComputerName,
|
|---|
| 250 | PSZ pszDirectory,
|
|---|
| 251 | PVOID pReserved );
|
|---|
| 252 |
|
|---|
| 253 | ULONG APIENTRY SplDisable (PSZ pszComputerName,
|
|---|
| 254 | PVOID pReserved );
|
|---|
| 255 |
|
|---|
| 256 | /*
|
|---|
| 257 | * Control Panel entry points
|
|---|
| 258 | */
|
|---|
| 259 |
|
|---|
| 260 | /*** Register a DLL as a control panel for printers ***/
|
|---|
| 261 | ULONG APIENTRY SplRegisterControlPanel(PSZ pszName,
|
|---|
| 262 | PSZ pszDllPath,
|
|---|
| 263 | ULONG ulFlags,
|
|---|
| 264 | PSZ pszReserved,
|
|---|
| 265 | ULONG ulVersion );
|
|---|
| 266 |
|
|---|
| 267 | /*** Return a comma separated list of control panels available ***/
|
|---|
| 268 | /*** for the printer on the given port ***/
|
|---|
| 269 | ULONG APIENTRY SplGetControlPanelList(PSZ pszComputerName,
|
|---|
| 270 | PSZ pszPortName,
|
|---|
| 271 | PSZ pszDeviceID,
|
|---|
| 272 | ULONG flCapabilities,
|
|---|
| 273 | PSZ pszListOfPanels,
|
|---|
| 274 | ULONG cbBuf,
|
|---|
| 275 | PULONG pcbNeeded );
|
|---|
| 276 |
|
|---|
| 277 | /*** The following APIs are exported by control panel DLLs ***/
|
|---|
| 278 | /*** or protocol converters ***/
|
|---|
| 279 | /*** They also are exported by PMSPL(the spooler) to allow ***/
|
|---|
| 280 | /*** applications to use the spooler to start a control ***/
|
|---|
| 281 | /*** panel view. ***/
|
|---|
| 282 | ULONG APIENTRY SplQueryControlPanel(PSZ pszComputerName,
|
|---|
| 283 | PSZ pszPortName,
|
|---|
| 284 | PSZ pszDeviceID,
|
|---|
| 285 | PSZ pszControlPanel,
|
|---|
| 286 | ULONG flCapabilities,
|
|---|
| 287 | PULONG pulOptions );
|
|---|
| 288 | ULONG APIENTRY SplDisplayControlPanel(PSZ pszComputerName,
|
|---|
| 289 | PSZ pszPortName,
|
|---|
| 290 | PSZ pszDeviceID,
|
|---|
| 291 | PSZ pszControlPanel,
|
|---|
| 292 | HAB hab,
|
|---|
| 293 | ULONG flCapabilities );
|
|---|
| 294 |
|
|---|
| 295 | /*** Bits for flCapabilities ***/
|
|---|
| 296 | #define FL_ADMIN 0x00000001
|
|---|
| 297 |
|
|---|
| 298 | /*** Values returned in *pulOptions ***/
|
|---|
| 299 | #define OPT_GENERIC 0x00000001
|
|---|
| 300 | #define OPT_CUSTOM 0x00000002
|
|---|
| 301 |
|
|---|
| 302 |
|
|---|
| 303 | /*
|
|---|
| 304 | * System INI application names:
|
|---|
| 305 | *
|
|---|
| 306 | * AppName KeyName KeyValue
|
|---|
| 307 | *
|
|---|
| 308 | * PM_PROTOCOL_CONVERTER ConverterName Path to converter
|
|---|
| 309 | * (ex: "PJL","NPA") (ex: "C:\OS2\DLL\PROT.CNV")
|
|---|
| 310 | *
|
|---|
| 311 | * PM_PROTOCOL_EXTENSION ConverterName Base converter,Path to converter
|
|---|
| 312 | * (ex: "MYNPAEXT") (ex: "NPAP,C:\OS2\DLL\PROT.CNV")
|
|---|
| 313 | *
|
|---|
| 314 | * PM_SPOOLER_CONTROL_PANEL ControlPanelName Path to DLL with ctrl panel
|
|---|
| 315 | * (ex: "HPLASERJETS" (ex: "C:\OS2\DLL\CPANEL.DLL")
|
|---|
| 316 | * "LEXMARK4039")
|
|---|
| 317 | *
|
|---|
| 318 | */
|
|---|
| 319 | #define SYS_INI_PROTOCOL_CONVERTER "PM_PROTOCOL_CONVERTER"
|
|---|
| 320 | #define SYS_INI_PROTOCOL_EXTENSION "PM_PROTOCOL_EXTENSION"
|
|---|
| 321 | #define SYS_INI_CONTROL_PANEL "PM_SPOOLER_CONTROL_PANEL"
|
|---|
| 322 |
|
|---|
| 323 | /*
|
|---|
| 324 | * SplPdEnumPort returned structure for level 1(should be in pmspl.h)
|
|---|
| 325 | */
|
|---|
| 326 | typedef struct _PORTNAMES
|
|---|
| 327 | {
|
|---|
| 328 | PSZ pszPortName; /* -> name of port(ie "LPT1) */
|
|---|
| 329 | PSZ pszPortDesc; /* -> description of port(ie "Parallel Port 1") */
|
|---|
| 330 | } PORTNAMES, *PPORTNAMES;
|
|---|
| 331 |
|
|---|
| 332 |
|
|---|
| 333 | /*
|
|---|
| 334 | * PrtOpen/SplPdOpen structure
|
|---|
| 335 | */
|
|---|
| 336 | typedef struct _PRTOPENSTRUCT0 {
|
|---|
| 337 | ULONG ulVersion;
|
|---|
| 338 | ULONG ulSpoolerJobID;
|
|---|
| 339 | PSZ pszUserName;
|
|---|
| 340 | PSZ pszFormName;
|
|---|
| 341 | PSZ pszDriverName;
|
|---|
| 342 | PSZ pszInterpreter;
|
|---|
| 343 | ULONG ulLogicalUnit;
|
|---|
| 344 | ULONG ulStartPage;
|
|---|
| 345 | ULONG ulEndPage;
|
|---|
| 346 | } PRTOPENSTRUCT0;
|
|---|
| 347 | typedef PRTOPENSTRUCT0 FAR *PPRTOPENSTRUCT0;
|
|---|
| 348 |
|
|---|
| 349 |
|
|---|
| 350 | /*
|
|---|
| 351 | * Structures for PrtQuery/PrtSet commands
|
|---|
| 352 | */
|
|---|
| 353 |
|
|---|
| 354 | /* BIDI_Q_PORT */
|
|---|
| 355 | typedef struct _PRTPORT {
|
|---|
| 356 | ULONG flBidiCapabilities;
|
|---|
| 357 | ULONG flBidiProtocol;
|
|---|
| 358 | ULONG ulPortType;
|
|---|
| 359 | ULONG ulpszProtocol;
|
|---|
| 360 | ULONG ulpszDeviceID;
|
|---|
| 361 | ULONG ulBidiLevel;
|
|---|
| 362 | ULONG flPrinterStatus;
|
|---|
| 363 | ULONG ulAdapterLevel;
|
|---|
| 364 | ULONG ulMaxSendSize;
|
|---|
| 365 | ULONG ulMaxReceiveSize;
|
|---|
| 366 | ULONG ulMaxHeldResponses;
|
|---|
| 367 | } PRTPORT;
|
|---|
| 368 | typedef PRTPORT FAR *PPRTPORT;
|
|---|
| 369 |
|
|---|
| 370 | #define PRTPORT_CAPS_BIDI_CAPABLE 0x00000001
|
|---|
| 371 | #define PRTPORT_CAPS_BIDI_ACTIVE 0x00000002
|
|---|
| 372 | #define PRTPORT_CAPS_DEVICEID_LATER 0x00000004
|
|---|
| 373 | #define PRTPORT_CAPS_CMD_CHANNEL_AVAIL 0x00000008
|
|---|
| 374 | #define PRTPORT_CAPS_NOT_RESPONDING 0x00000010
|
|---|
| 375 | #define PRTPORT_CAPS_NOT_CONFIGURED 0x00000020
|
|---|
| 376 | #define PRTPORT_CAPS_NOT_CONNECTED 0x00000040
|
|---|
| 377 | #define PRTPORT_CAPS_NO_ASYNCH_STATUS 0x00000080
|
|---|
| 378 |
|
|---|
| 379 | #define PRTPORT_CAPS_PDRCNV_MASK 0x00000F00
|
|---|
| 380 |
|
|---|
| 381 |
|
|---|
| 382 | #define PRTPORT_TYPE_NO_CNV 0x00000001
|
|---|
| 383 | #define PRTPORT_TYPE_NPAP 0x00000002
|
|---|
| 384 | #define PRTPORT_TYPE_PJL 0x00000004
|
|---|
| 385 | #define PRTPORT_TYPE_SNMP 0x00000008
|
|---|
| 386 | #define PRTPORT_TYPE_RESERVED 0x00000010
|
|---|
| 387 |
|
|---|
| 388 | #define PRTPORT_PORT_TYPE_LPT 1
|
|---|
| 389 | #define PRTPORT_PORT_TYPE_COM 2
|
|---|
| 390 | #define PRTPORT_PORT_TYPE_NETWORK 3
|
|---|
| 391 | #define PRTPORT_PORT_TYPE_SCSI 4
|
|---|
| 392 | #define PRTPORT_PORT_TYPE_INFRARED 5
|
|---|
| 393 |
|
|---|
| 394 | #define PRTPORT_STAT_OFFLINE 0x00000001
|
|---|
| 395 | #define PRTPORT_STAT_BUSY 0x00000002
|
|---|
| 396 |
|
|---|
| 397 | /* BIDI_Q_SW */
|
|---|
| 398 | typedef struct _PRTSW {
|
|---|
| 399 | ULONG flJob; /* job contol flags */
|
|---|
| 400 | ULONG flDevice; /* printer flags */
|
|---|
| 401 | } PRTSW;
|
|---|
| 402 | typedef PRTSW FAR *PPRTSW;
|
|---|
| 403 |
|
|---|
| 404 | #define PRTSW_JOB_BOUNDARY_SEND 0x00000001
|
|---|
| 405 | #define PRTSW_JOB_BOUNDARY_PROCESS 0x00000002
|
|---|
| 406 | #define PRTSW_JOB_TRUE_END 0x00000004
|
|---|
| 407 | #define PRTSW_JOB_HOLD_RELEASE 0x00000008
|
|---|
| 408 | #define PRTSW_JOB_CANCEL 0x00000010
|
|---|
| 409 | #define PRTSW_JOB_MUST_RESUBMIT 0x00000020
|
|---|
| 410 | #define PRTSW_JOB_WRAPPER_REQUIRED 0x00000040
|
|---|
| 411 | #define PRTSW_JOB_STARTPAGE 0x00000080
|
|---|
| 412 | #define PRTSW_JOB_ENDPAGE 0x00000100
|
|---|
| 413 |
|
|---|
| 414 | #define PRTSW_DEV_PAGEPRINT_ALERT 0x00000001
|
|---|
| 415 | #define PRTSW_DEV_JOBBEGIN_ALERT 0x00000002
|
|---|
| 416 | #define PRTSW_DEV_JOBSTACK_ALERT 0x00000004
|
|---|
| 417 | #define PRTSW_DEV_TIMED_ALERT 0x00000008
|
|---|
| 418 | #define PRTSW_DEV_LU_REQUIRED 0x00000010
|
|---|
| 419 |
|
|---|
| 420 | /* BIDI_Q_DEVICE */
|
|---|
| 421 | typedef struct _PRTDEVCHAR {
|
|---|
| 422 | USHORT majorRev;
|
|---|
| 423 | USHORT minorRev;
|
|---|
| 424 | USHORT cLogicalConnections;
|
|---|
| 425 | USHORT cPhysicalConnections;
|
|---|
| 426 | USHORT cActiveConnections;
|
|---|
| 427 | USHORT usReserved;
|
|---|
| 428 | USHORT extensionRev;
|
|---|
| 429 | USHORT maxJobsComplete;
|
|---|
| 430 | BYTE markingTech;
|
|---|
| 431 | BYTE colorCaps;
|
|---|
| 432 | USHORT colorlevels;
|
|---|
| 433 | BYTE duplexCaps;
|
|---|
| 434 | BYTE lengthUnits;
|
|---|
| 435 | USHORT horizUnits;
|
|---|
| 436 | USHORT vertUnits;
|
|---|
| 437 | USHORT speed;
|
|---|
| 438 | BYTE speedUnits;
|
|---|
| 439 | BYTE counterUnits;
|
|---|
| 440 | BYTE interpreters;
|
|---|
| 441 | BYTE inputs;
|
|---|
| 442 | BYTE outputs;
|
|---|
| 443 | BYTE options;
|
|---|
| 444 | BYTE msgLanguage;
|
|---|
| 445 | BYTE ubReserved;
|
|---|
| 446 | ULONG maxReceivePacketSize;
|
|---|
| 447 | USHORT maxOutstandingCmds;
|
|---|
| 448 | USHORT usReserved1;
|
|---|
| 449 | ULONG memory;
|
|---|
| 450 | ULONG ulpszPrinterName;
|
|---|
| 451 | ULONG ulpszRevision;
|
|---|
| 452 | ULONG ulpszSerialNo;
|
|---|
| 453 | } PRTDEVCHAR;
|
|---|
| 454 | typedef PRTDEVCHAR FAR *PPRTDEVCHAR;
|
|---|
| 455 |
|
|---|
| 456 | /* BIDI_Q_INTERPRETER */
|
|---|
| 457 | typedef struct _PRTINTERP {
|
|---|
| 458 | BYTE logicalUnit;
|
|---|
| 459 | BYTE bReserved;
|
|---|
| 460 | USHORT usReserved;
|
|---|
| 461 | ULONG features;
|
|---|
| 462 | ULONG memory;
|
|---|
| 463 | USHORT fontcount;
|
|---|
| 464 | BYTE inputs;
|
|---|
| 465 | BYTE outputs;
|
|---|
| 466 | USHORT horizRes;
|
|---|
| 467 | USHORT vertRes;
|
|---|
| 468 | ULONG ulpszInterpreter;
|
|---|
| 469 | } PRTINTERP;
|
|---|
| 470 | typedef PRTINTERP FAR *PPRTINTERP;
|
|---|
| 471 |
|
|---|
| 472 | typedef struct _PRTINTERPL {
|
|---|
| 473 | ULONG cTotal;
|
|---|
| 474 | ULONG cReturned;
|
|---|
| 475 | PRTINTERP prtInterpeter[1];
|
|---|
| 476 | } PRTINTERPL;
|
|---|
| 477 | typedef PRTINTERPL FAR *PPRTINTERPL;
|
|---|
| 478 |
|
|---|
| 479 | /* BIDI_Q_INPUTBINS and BIDI_Q_OUTPUTBINS input structure */
|
|---|
| 480 | typedef struct _QBINS {
|
|---|
| 481 | ULONG ulInterpreterID;
|
|---|
| 482 | ULONG ulBinID;
|
|---|
| 483 | } QBINS;
|
|---|
| 484 | typedef QBINS FAR *PQBINS;
|
|---|
| 485 |
|
|---|
| 486 | /* BIDI_Q_INPUTBINS output structure */
|
|---|
| 487 | typedef struct _PRTINPUTS {
|
|---|
| 488 | BYTE logicalUnit;
|
|---|
| 489 | BYTE bReserved;
|
|---|
| 490 | USHORT usReserved;
|
|---|
| 491 | BYTE inputID;
|
|---|
| 492 | BYTE feedType;
|
|---|
| 493 | BYTE formChar;
|
|---|
| 494 | BYTE formSize;
|
|---|
| 495 | ULONG maxCapacity;
|
|---|
| 496 | USHORT maxCrossFormSize;
|
|---|
| 497 | USHORT maxFeedFormSize;
|
|---|
| 498 | USHORT curCrossFormSize;
|
|---|
| 499 | USHORT curFeedFormSize;
|
|---|
| 500 | USHORT topMargin;
|
|---|
| 501 | USHORT botMargin;
|
|---|
| 502 | USHORT leftMargin;
|
|---|
| 503 | USHORT rightMargin;
|
|---|
| 504 | ULONG ulpszInput;
|
|---|
| 505 | ULONG ulpszForm;
|
|---|
| 506 | } PRTINPUTS;
|
|---|
| 507 | typedef PRTINPUTS FAR *PPRTINPUTS;
|
|---|
| 508 |
|
|---|
| 509 | typedef struct _PRTINPUTSL {
|
|---|
| 510 | ULONG cTotal;
|
|---|
| 511 | ULONG cReturned;
|
|---|
| 512 | PRTINPUTS prtInputs[1];
|
|---|
| 513 | } PRTINPUTSL;
|
|---|
| 514 | typedef PRTINPUTSL FAR *PPRTINPUTSL;
|
|---|
| 515 |
|
|---|
| 516 | /* defines for the input form sizes */
|
|---|
| 517 | #define PRT_FORMSIZE_RESERVED 0x00
|
|---|
| 518 | #define PRT_FORMSIZE_A 0x01
|
|---|
| 519 | #define PRT_FORMSIZE_B 0x02
|
|---|
| 520 | #define PRT_FORMSIZE_C 0x03
|
|---|
| 521 | #define PRT_FORMSIZE_D 0x04
|
|---|
| 522 | #define PRT_FORMSIZE_E 0x05
|
|---|
| 523 | #define PRT_FORMSIZE_F 0x06
|
|---|
| 524 | #define PRT_FORMSIZE_LEGAL 0x07
|
|---|
| 525 | #define PRT_FORMSIZE_1_2LETTER 0x08
|
|---|
| 526 | #define PRT_FORMSIZE_EXECUTIVE 0x09
|
|---|
| 527 | #define PRT_FORMSIZE_4A0 0x10
|
|---|
| 528 | #define PRT_FORMSIZE_2A0 0x11
|
|---|
| 529 | #define PRT_FORMSIZE_A0 0x12
|
|---|
| 530 | #define PRT_FORMSIZE_A1 0x13
|
|---|
| 531 | #define PRT_FORMSIZE_A2 0x14
|
|---|
| 532 | #define PRT_FORMSIZE_A3 0x15
|
|---|
| 533 | #define PRT_FORMSIZE_A4 0x16
|
|---|
| 534 | #define PRT_FORMSIZE_A5 0x17
|
|---|
| 535 | #define PRT_FORMSIZE_A6 0x18
|
|---|
| 536 | #define PRT_FORMSIZE_A7 0x19
|
|---|
| 537 | #define PRT_FORMSIZE_A8 0x1A
|
|---|
| 538 | #define PRT_FORMSIZE_A9 0x1B
|
|---|
| 539 | #define PRT_FORMSIZE_A10 0x1C
|
|---|
| 540 | #define PRT_FORMSIZE_RA0 0x20
|
|---|
| 541 | #define PRT_FORMSIZE_RA1 0x21
|
|---|
| 542 | #define PRT_FORMSIZE_RA2 0x22
|
|---|
| 543 | #define PRT_FORMSIZE_SRA0 0x23
|
|---|
| 544 | #define PRT_FORMSIZE_SRA1 0x24
|
|---|
| 545 | #define PRT_FORMSIZE_SRA2 0x25
|
|---|
| 546 | #define PRT_FORMSIZE_B0 0x30
|
|---|
| 547 | #define PRT_FORMSIZE_B1 0x31
|
|---|
| 548 | #define PRT_FORMSIZE_B2 0x32
|
|---|
| 549 | #define PRT_FORMSIZE_B3 0x33
|
|---|
| 550 | #define PRT_FORMSIZE_B4 0x34
|
|---|
| 551 | #define PRT_FORMSIZE_B5 0x35
|
|---|
| 552 | #define PRT_FORMSIZE_B6 0x36
|
|---|
| 553 | #define PRT_FORMSIZE_B7 0x37
|
|---|
| 554 | #define PRT_FORMSIZE_B8 0x38
|
|---|
| 555 | #define PRT_FORMSIZE_B9 0x39
|
|---|
| 556 | #define PRT_FORMSIZE_B10 0x3A
|
|---|
| 557 | #define PRT_FORMSIZE_C0 0x40
|
|---|
| 558 | #define PRT_FORMSIZE_C1 0x41
|
|---|
| 559 | #define PRT_FORMSIZE_C2 0x42
|
|---|
| 560 | #define PRT_FORMSIZE_C3 0x43
|
|---|
| 561 | #define PRT_FORMSIZE_C4 0x44
|
|---|
| 562 | #define PRT_FORMSIZE_C5 0x45
|
|---|
| 563 | #define PRT_FORMSIZE_C6 0x46
|
|---|
| 564 | #define PRT_FORMSIZE_C7 0x47
|
|---|
| 565 | #define PRT_FORMSIZE_C8 0x48
|
|---|
| 566 | #define PRT_FORMSIZE_ENVELOPEC3 0x50
|
|---|
| 567 | #define PRT_FORMSIZE_ENVELOPEB4 0x51
|
|---|
| 568 | #define PRT_FORMSIZE_ENVELOPEC4 0x52
|
|---|
| 569 | #define PRT_FORMSIZE_ENVELOPEB5 0x53
|
|---|
| 570 | #define PRT_FORMSIZE_ENVELOPEC5 0x54
|
|---|
| 571 | #define PRT_FORMSIZE_ENVELOPEB6_C4 0x55
|
|---|
| 572 | #define PRT_FORMSIZE_ENVELOPEB6 0x56
|
|---|
| 573 | #define PRT_FORMSIZE_ENVELOPEC6 0x57
|
|---|
| 574 | #define PRT_FORMSIZE_ENVELOPEDL 0x58
|
|---|
| 575 | #define PRT_FORMSIZE_ENVELOPEC7_6 0x59
|
|---|
| 576 | #define PRT_FORMSIZE_ENVELOPEC7 0x5A
|
|---|
| 577 | #define PRT_FORMSIZE_POSTCARD 0x60
|
|---|
| 578 | #define PRT_FORMSIZE_DOUBLEPOSTCARD 0x61
|
|---|
| 579 | #define PRT_FORMSIZE_B0_J 0x70
|
|---|
| 580 | #define PRT_FORMSIZE_B1_J 0x71
|
|---|
| 581 | #define PRT_FORMSIZE_B2_J 0x72
|
|---|
| 582 | #define PRT_FORMSIZE_B3_J 0x73
|
|---|
| 583 | #define PRT_FORMSIZE_B4_J 0x74
|
|---|
| 584 | #define PRT_FORMSIZE_B5_J 0x75
|
|---|
| 585 | #define PRT_FORMSIZE_B6_J 0x76
|
|---|
| 586 | #define PRT_FORMSIZE_B7_J 0x77
|
|---|
| 587 | #define PRT_FORMSIZE_B8_J 0x78
|
|---|
| 588 | #define PRT_FORMSIZE_B9_J 0x79
|
|---|
| 589 | #define PRT_FORMSIZE_B10_J 0x7A
|
|---|
| 590 | #define PRT_FORMSIZE_ENVELOPE7_3_4 0x80
|
|---|
| 591 | #define PRT_FORMSIZE_ENVELOPE9 0x81
|
|---|
| 592 | #define PRT_FORMSIZE_ENVELOPE10 0x82
|
|---|
| 593 | #define PRT_FORMSIZE_OTHER 0xFE
|
|---|
| 594 | #define PRT_FORMSIZE_UNKNOWN 0xFF
|
|---|
| 595 |
|
|---|
| 596 | /* BIDI_Q_OUTPUTBINS output structure */
|
|---|
| 597 | typedef struct _PRTOUTPUTS {
|
|---|
| 598 | BYTE logicalUnit;
|
|---|
| 599 | BYTE bReserved;
|
|---|
| 600 | USHORT usReserved;
|
|---|
| 601 | BYTE outputID;
|
|---|
| 602 | BYTE positions;
|
|---|
| 603 | BYTE features1;
|
|---|
| 604 | BYTE features2;
|
|---|
| 605 | ULONG maxCapacity;
|
|---|
| 606 | ULONG ulpszOutput;
|
|---|
| 607 | } PRTOUTPUTS;
|
|---|
| 608 | typedef PRTOUTPUTS FAR *PPRTOUTPUTS;
|
|---|
| 609 |
|
|---|
| 610 | typedef struct _PRTOUTPUTSL {
|
|---|
| 611 | ULONG cTotal;
|
|---|
| 612 | ULONG cReturned;
|
|---|
| 613 | PRTOUTPUTS prtOutputs[1];
|
|---|
| 614 | } PRTOUTPUTSL;
|
|---|
| 615 | typedef PRTOUTPUTSL FAR *PPRTOUTPUTSL;
|
|---|
| 616 |
|
|---|
| 617 | /* BIDI_Q_FONTS input structure */
|
|---|
| 618 | typedef struct _PRTFONTS_Q {
|
|---|
| 619 | BYTE interpreterID;
|
|---|
| 620 | BYTE bReserved;
|
|---|
| 621 | USHORT usStorageTypeID;
|
|---|
| 622 | ULONG ulStorageType;
|
|---|
| 623 | ULONG ulFontID;
|
|---|
| 624 | } PRTFONTS_Q;
|
|---|
| 625 | typedef PRTFONTS_Q FAR *PPRTFONTS_Q;
|
|---|
| 626 |
|
|---|
| 627 | /* BIDI_Q_FONTS returned structure */
|
|---|
| 628 | typedef struct _PRTFONTS {
|
|---|
| 629 | BYTE interpreterID;
|
|---|
| 630 | BYTE bReserved;
|
|---|
| 631 | USHORT usStorageTypeID;
|
|---|
| 632 | ULONG ulStorageType;
|
|---|
| 633 | ULONG ulFontID;
|
|---|
| 634 | ULONG ulTechnology;
|
|---|
| 635 | ULONG ulpszName;
|
|---|
| 636 | ULONG ulpszDescription;
|
|---|
| 637 | } PRTFONTS;
|
|---|
| 638 | typedef PRTFONTS FAR *PPRTFONTS;
|
|---|
| 639 |
|
|---|
| 640 | #define PRTFONTS_STOR_TYPE_RESIDENT 0x00000000
|
|---|
| 641 | #define PRTFONTS_STOR_TYPE_REMOVABLE_CARD 0x00000001
|
|---|
| 642 | #define PRTFONTS_STOR_TYPE_DISK 0x00000002
|
|---|
| 643 | #define PRTFONTS_STOR_TYPE_RAM 0x00000003
|
|---|
| 644 | #define PRTFONTS_STOR_TYPE_FLASH 0x00000004
|
|---|
| 645 | #define PRTFONTS_STOR_TYPE_ROM 0x00000005
|
|---|
| 646 | #define PRTFONTS_STOR_TYPE_LIST_ABORTED 0xFFFFFFFE
|
|---|
| 647 | #define PRTFONTS_STOR_TYPE_ALL 0xFFFFFFFF
|
|---|
| 648 |
|
|---|
| 649 | #define PRTFONTS_TECH_OTHER 0
|
|---|
| 650 | #define PRTFONTS_TECH_ATM_TYPE1 1
|
|---|
| 651 | #define PRTFONTS_TECH_TRUE_TYPE 2
|
|---|
| 652 | #define PRTFONTS_TECH_INTELLIFONT 3
|
|---|
| 653 | #define PRTFONTS_TECH_BITMAP 4
|
|---|
| 654 |
|
|---|
| 655 | /* BIDI_Q_JOBS_COMPLETE and BIDI_Q_JOBS_QUEUED input structure */
|
|---|
| 656 | typedef struct _PRTJOBS_Q {
|
|---|
| 657 | ULONG ulInterpreterID;
|
|---|
| 658 | ULONG ulPrinterJobID;
|
|---|
| 659 | ULONG ulMaxJobs;
|
|---|
| 660 | } PRTJOBS_Q;
|
|---|
| 661 |
|
|---|
| 662 | /* BIDI_Q_JOBS_COMPLETE and BIDI_Q_JOBS_QUEUED returned structure */
|
|---|
| 663 | typedef struct _PRTJOBS {
|
|---|
| 664 | BYTE interpreterID;
|
|---|
| 665 | BYTE bReserved;
|
|---|
| 666 | USHORT fsStatus;
|
|---|
| 667 | ULONG ulPrinterJobID;
|
|---|
| 668 | ULONG ulProcessTime;
|
|---|
| 669 | ULONG ulSheets;
|
|---|
| 670 | ULONG ulImpressions;
|
|---|
| 671 | } PRTJOBS;
|
|---|
| 672 | typedef PRTJOBS FAR *PPRTJOBS;
|
|---|
| 673 |
|
|---|
| 674 | #define PRTJOBS_STATUS_COMPLETE 0x00001
|
|---|
| 675 | #define PRTJOBS_STATUS_PRINTING 0x00002
|
|---|
| 676 | #define PRTJOBS_STATUS_PAUSED 0x00004
|
|---|
| 677 |
|
|---|
| 678 |
|
|---|
| 679 |
|
|---|
| 680 | /* BIDI_Q_STATUS */
|
|---|
| 681 | /*
|
|---|
| 682 | * Type of status to return
|
|---|
| 683 | */
|
|---|
| 684 | #define PRTSTATUS_TYPE_INPUTS 0x00000001
|
|---|
| 685 | #define PRTSTATUS_TYPE_OUTPUTS 0x00000002
|
|---|
| 686 | #define PRTSTATUS_TYPE_JAMS 0x00000004
|
|---|
| 687 | #define PRTSTATUS_TYPE_OP_INTERV 0x00000008
|
|---|
| 688 | #define PRTSTATUS_TYPE_WARNINGS 0x00000010
|
|---|
| 689 | #define PRTSTATUS_TYPE_SERVICE_REQ 0x00000020
|
|---|
| 690 | #define PRTSTATUS_TYPE_CONFIG_CHANGES 0x00000040
|
|---|
| 691 | #define PRTSTATUS_TYPE_SUPPLIES 0x00000080
|
|---|
| 692 | #define PRTSTATUS_TYPE_PRINTER_STATS 0x00000100
|
|---|
| 693 |
|
|---|
| 694 | /*
|
|---|
| 695 | * printerStatus bits
|
|---|
| 696 | */
|
|---|
| 697 | #define PRTSTATUS_PROTCNV_HAS_STATUS 0x01
|
|---|
| 698 | #define PRTSTATUS_POWER_ON 0x02
|
|---|
| 699 | #define PRTSTATUS_OFFLINE 0x04
|
|---|
| 700 | #define PRTSTATUS_PRINTER_BUSY 0x08
|
|---|
| 701 | #define PRTSTATUS_NOT_ACCEPTING_DATA 0x10
|
|---|
| 702 | /*
|
|---|
| 703 | * deviceAlerts1 bits
|
|---|
| 704 | */
|
|---|
| 705 | #define PRTSTATUS_DEV1_SUPPLY_ALERT 0x01
|
|---|
| 706 | #define PRTSTATUS_DEV1_JAM_ALERT 0x02
|
|---|
| 707 | #define PRTSTATUS_DEV1_OUTPUT_ALERT 0x04
|
|---|
| 708 | #define PRTSTATUS_DEV1_INPUT_ALERT 0x08
|
|---|
| 709 | /*
|
|---|
| 710 | * deviceAlerts2 bits
|
|---|
| 711 | */
|
|---|
| 712 | #define PRTSTATUS_DEV2_CONFIG_ALERT 0x01
|
|---|
| 713 | #define PRTSTATUS_DEV2_WARNING_ALERT 0x02
|
|---|
| 714 | #define PRTSTATUS_DEV2_SERVICE_ALERT 0x04
|
|---|
| 715 | #define PRTSTATUS_DEV2_OPERATOR_ALERT 0x08
|
|---|
| 716 | /*
|
|---|
| 717 | * InputStatus OutputStatus and SuppliesLevel bits
|
|---|
| 718 | */
|
|---|
| 719 | #define PRTSTATUS_LEVEL_MASK 0x0007
|
|---|
| 720 | #define PRTSTATUS_TRAY_MISSING 0x0008
|
|---|
| 721 | #define PRTSTATUS_BROKEN 0x0010
|
|---|
| 722 | #define PRTSTATUS_INOUT_BUSY 0x0020
|
|---|
| 723 | #define PRTSTATUS_ALERT_ACTIVE 0x8000
|
|---|
| 724 | /*
|
|---|
| 725 | * Jam Location Code
|
|---|
| 726 | */
|
|---|
| 727 | #define PRTSTATUS_JAM_CODE_INPUT 0x01
|
|---|
| 728 | #define PRTSTATUS_JAM_CODE_OUTPUT 0x02
|
|---|
| 729 | #define PRTSTATUS_JAM_CODE_INTERNAL 0x03
|
|---|
| 730 | #define PRTSTATUS_JAM_CODE_DUPLEX 0x04
|
|---|
| 731 | #define PRTSTATUS_JAM_CODE_EXTERNAL 0x05
|
|---|
| 732 | #define PRTSTATUS_JAM_CODE_STACKER 0x06
|
|---|
| 733 | #define PRTSTATUS_JAM_CODE_FINISHER 0x07
|
|---|
| 734 | #define PRTSTATUS_JAM_CODE_MARKER 0x08
|
|---|
| 735 | #define PRTSTATUS_JAM_CODE_LOG_UNIT 0x09
|
|---|
| 736 | #define PRTSTATUS_JAM_CODE_OTHER 0xFE
|
|---|
| 737 | #define PRTSTATUS_JAM_CODE_UNKNOWN 0xFF
|
|---|
| 738 | /*
|
|---|
| 739 | * Operator Alert Codes
|
|---|
| 740 | */
|
|---|
| 741 | #define PRTSTATUS_OP_COVER_OPEN 0x01
|
|---|
| 742 | #define PRTSTATUS_OP_WASTE_TONER_FULL 0x02
|
|---|
| 743 | #define PRTSTATUS_OP_RIBBON_JAM 0x03
|
|---|
| 744 | #define PRTSTATUS_OP_WASTE_INK_FULL 0x04
|
|---|
| 745 | #define PRTSTATUS_OP_OTHER 0xFE
|
|---|
| 746 | #define PRTSTATUS_OP_UNKNOWN 0xFF
|
|---|
| 747 | /*
|
|---|
| 748 | * Warning Alert Codes
|
|---|
| 749 | */
|
|---|
| 750 | #define PRTSTATUS_WARNING_TONER_LOW 0x01
|
|---|
| 751 | #define PRTSTATUS_WARNING_INK_LOW 0x02
|
|---|
| 752 | #define PRTSTATUS_WARNING_INPUT_LOW 0x03
|
|---|
| 753 | #define PRTSTATUS_WARNING_OUTPUT_FULL 0x04
|
|---|
| 754 | #define PRTSTATUS_WARNING_COVER_OPEN 0x05
|
|---|
| 755 | #define PRTSTATUS_WARNING_FUSING_LOW 0x06
|
|---|
| 756 | #define PRTSTATUS_WARNING_OTHER 0xFE
|
|---|
| 757 | #define PRTSTATUS_WARNING_UNKNOWN 0xFF
|
|---|
| 758 | /*
|
|---|
| 759 | * Service Required Alert Codes
|
|---|
| 760 | */
|
|---|
| 761 | #define PRTSTATUS_SERVICE_HARD_ERROR 0x01
|
|---|
| 762 | #define PRTSTATUS_SERVICE_SOFT_ERROR 0x02
|
|---|
| 763 | #define PRTSTATUS_SERVICE_UNKNOWN 0xFF
|
|---|
| 764 | /*
|
|---|
| 765 | * Configure Alert Codes
|
|---|
| 766 | */
|
|---|
| 767 | #define PRTSTATUS_CONFIG_INT_RES_DEL 0x01
|
|---|
| 768 | #define PRTSTATUS_CONFIG_INT_RES_ADD 0x02
|
|---|
| 769 | #define PRTSTATUS_CONFIG_TRAY_REMOVED 0x03
|
|---|
| 770 | #define PRTSTATUS_CONFIG_TRAY_INSERTED 0x04
|
|---|
| 771 | #define PRTSTATUS_CONFIG_CART_REMOVED 0x05
|
|---|
| 772 | #define PRTSTATUS_CONFIG_CART_INSERTED 0x06
|
|---|
| 773 | #define PRTSTATUS_CONFIG_MEM_REDUCED 0x07
|
|---|
| 774 | #define PRTSTATUS_CONFIG_MEM_ADDED 0x08
|
|---|
| 775 | #define PRTSTATUS_CONFIG_OTHER 0xFE
|
|---|
| 776 | #define PRTSTATUS_CONFIG_UNKNOWN 0xFF
|
|---|
| 777 | /*
|
|---|
| 778 | * Supplies Alert Codes
|
|---|
| 779 | */
|
|---|
| 780 | #define PRTSTATUS_SUPPLY_OUT_OF_TONER 0x01
|
|---|
| 781 | #define PRTSTATUS_SUPPLY_OUT_OF_INK 0x02
|
|---|
| 782 | #define PRTSTATUS_SUPPLY_RIBBON_OUT 0x03
|
|---|
| 783 | #define PRTSTATUS_SUPPLY_OTHER 0xFE
|
|---|
| 784 | #define PRTSTATUS_SUPPLY_UNKNOWN 0xFF
|
|---|
| 785 | /*
|
|---|
| 786 | * Printer Statistics Codes
|
|---|
| 787 | */
|
|---|
| 788 | #define PRTSTATUS_STATS_UNITS_TOTAL 0x01
|
|---|
| 789 | #define PRTSTATUS_STATS_UNITS_POWERON 0x02
|
|---|
| 790 | #define PRTSTATUS_STATS_UNITS_SUPPLIES 0x03
|
|---|
| 791 | #define PRTSTATUS_STATS_HOST_COUNTER 0x04
|
|---|
| 792 | #define PRTSTATUS_STATS_UNKNOWN 0xFF
|
|---|
| 793 |
|
|---|
| 794 |
|
|---|
| 795 | /* BIDI_WAIT_ALERT */
|
|---|
| 796 | typedef struct _PRTALERT {
|
|---|
| 797 | ULONG ulpszPortName;
|
|---|
| 798 | ULONG ulCategory;
|
|---|
| 799 | ULONG ulType;
|
|---|
| 800 | BYTE interpreterID;
|
|---|
| 801 | BYTE bReserved;
|
|---|
| 802 | USHORT usSeverity;
|
|---|
| 803 | ULONG ulValue;
|
|---|
| 804 | ULONG ulPrinterJobID;
|
|---|
| 805 | ULONG ulpszAlertMsg;
|
|---|
| 806 | } PRTALERT;
|
|---|
| 807 | typedef PRTALERT FAR *PPRTALERT;
|
|---|
| 808 |
|
|---|
| 809 | #define PRTALERT_CATEGORY_ALL 0x00000000
|
|---|
| 810 | #define PRTALERT_CATEGORY_CORE 0x00000001
|
|---|
| 811 | #define PRTALERT_CATEGORY_ALL_CORE 0x00000002
|
|---|
| 812 | #define PRTALERT_CATEGORY_ALL_EXT 0x00000003
|
|---|
| 813 | #define PRTALERT_CATEGORY_EXTENDED 0x0000D000
|
|---|
| 814 | #define PRTALERT_CATEGORY_EXT_MAX 0x0000DFFF
|
|---|
| 815 |
|
|---|
| 816 | #define PRTALERT_TYPE_INPUT 1
|
|---|
| 817 | #define PRTALERT_TYPE_OUTPUT 2
|
|---|
| 818 | #define PRTALERT_TYPE_JAM 3
|
|---|
| 819 | #define PRTALERT_TYPE_OPERATOR 4
|
|---|
| 820 | #define PRTALERT_TYPE_CONFIG_CHANGE 5
|
|---|
| 821 | #define PRTALERT_TYPE_SUPPLIES 6
|
|---|
| 822 | #define PRTALERT_TYPE_JOB_START 7
|
|---|
| 823 | #define PRTALERT_TYPE_JOB_STACKED 8
|
|---|
| 824 | #define PRTALERT_TYPE_PAGE_PRINTED 9
|
|---|
| 825 | #define PRTALERT_TYPE_JOB_CANCELLED 10
|
|---|
| 826 | #define PRTALERT_TYPE_JOB_HELD 11
|
|---|
| 827 | #define PRTALERT_TYPE_COVER_OPEN 12
|
|---|
| 828 | #define PRTALERT_TYPE_POWER_ON 13
|
|---|
| 829 | #define PRTALERT_TYPE_RESET 14
|
|---|
| 830 | #define PRTALERT_TYPE_ONLINE 15
|
|---|
| 831 | #define PRTALERT_TYPE_OFFLINE 16
|
|---|
| 832 | #define PRTALERT_TYPE_TIMED_ALERT 17
|
|---|
| 833 | #define PRTALERT_TYPE_COMMUNICATION_PROBLEM 18
|
|---|
| 834 | #define PRTALERT_TYPE_COMM_STATUS_CHANGED 19
|
|---|
| 835 | #define PRTALERT_TYPE_OTHER 0xFFFFFFFF
|
|---|
| 836 |
|
|---|
| 837 | #define PRTALERT_INTERPRETER_CURRENT 0x00
|
|---|
| 838 | #define PRTALERT_INTERPRETER_NOTAPPLIC 0xFE
|
|---|
| 839 | #define PRTALERT_INTERPRETER_UNKNOWN 0xFF
|
|---|
| 840 |
|
|---|
| 841 | #define PRTALERT_SEV_INFORMATIONAL 0
|
|---|
| 842 | #define PRTALERT_SEV_WARNING 1
|
|---|
| 843 | #define PRTALERT_SEV_ERROR 2
|
|---|
| 844 | #define PRTALERT_SEV_SERVICE 3
|
|---|
| 845 | #define PRTALERT_SEV_OTHER 0xFE
|
|---|
| 846 | #define PRTALERT_SEV_UNKNOWN 0xFF
|
|---|
| 847 |
|
|---|
| 848 |
|
|---|
| 849 | /* BIDI_Q_JOBID, BIDI_ENDJOB */
|
|---|
| 850 | typedef struct _PRTJOB {
|
|---|
| 851 | ULONG ulInterpreterID;
|
|---|
| 852 | ULONG ulPrinterJobID;
|
|---|
| 853 | } PRTJOB;
|
|---|
| 854 | typedef PRTJOB FAR *PPRTJOB;
|
|---|
| 855 |
|
|---|
| 856 |
|
|---|
| 857 | /* BIDI_HOLDJOB, BIDI_RELEASEJOB, BIDI_CANCELJOB */
|
|---|
| 858 | typedef struct _PRTCONTROLJOB {
|
|---|
| 859 | ULONG ulInterpreterID;
|
|---|
| 860 | ULONG ulPrinterJobID;
|
|---|
| 861 | ULONG ulSpoolerJobID;
|
|---|
| 862 | } PRTCONTROLJOB;
|
|---|
| 863 | typedef PRTCONTROLJOB FAR *PPRTCONTROLJOB;
|
|---|
| 864 |
|
|---|
| 865 |
|
|---|
| 866 | /* BIDI_Q_RESPONSE_FMT */
|
|---|
| 867 | typedef struct _PRTRESPONSE {
|
|---|
| 868 | ULONG flResponseType;
|
|---|
| 869 | BYTE bFirstChar;
|
|---|
| 870 | BYTE bLastChar;
|
|---|
| 871 | USHORT usLenFieldOffset;
|
|---|
| 872 | USHORT usLenFieldWidth;
|
|---|
| 873 | USHORT usReserved;
|
|---|
| 874 | } PRTRESPONSE;
|
|---|
| 875 | typedef PRTRESPONSE FAR *PPRTRESPONSE;
|
|---|
| 876 |
|
|---|
| 877 | #define PRTRESPONSE_TYPE_FIRSTCHAR 0x00000001
|
|---|
| 878 | #define PRTRESPONSE_TYPE_LASTCHAR 0x00000002
|
|---|
| 879 | #define PRTRESPONSE_TYPE_LEN_USED 0x00000004
|
|---|
| 880 | #define PRTRESPONSE_TYPE_LEN_PREFIX 0x00000008
|
|---|
| 881 | #define PRTRESPONSE_TYPE_LEN_WIDTH 0x00000010
|
|---|
| 882 |
|
|---|
| 883 |
|
|---|
| 884 | /* BIDI_Q_CONVERTER_INFO */
|
|---|
| 885 | typedef struct _PRTCNVINFO {
|
|---|
| 886 | ULONG ulBaseVersion;
|
|---|
| 887 | ULONG ulpszBaseConverterName;
|
|---|
| 888 | ULONG ulpszBaseDescription;
|
|---|
| 889 | ULONG ulExtensionVersion;
|
|---|
| 890 | ULONG ulpszExtConverterName;
|
|---|
| 891 | ULONG ulpszExtDescription;
|
|---|
| 892 | } PRTCNVINFO;
|
|---|
| 893 | typedef PRTCNVINFO FAR *PPRTCNVINFO;
|
|---|
| 894 |
|
|---|
| 895 |
|
|---|
| 896 | /* BIDI_Q_SPOOLER_VERSION */
|
|---|
| 897 | typedef struct _PRTSPLRVER {
|
|---|
| 898 | ULONG ulMajorVersion; /* major version 1 for first release */
|
|---|
| 899 | ULONG ulMinorVersion; /* minor version 0 for first release */
|
|---|
| 900 | } PRTSPLRVER;
|
|---|
| 901 | typedef PRTSPLRVER FAR *PPRTSPLRVER;
|
|---|
| 902 |
|
|---|
| 903 |
|
|---|
| 904 | /* BIDI_Q_STORAGE */
|
|---|
| 905 | typedef struct _PRTSTORAGE {
|
|---|
| 906 | ULONG ulType; /* type of storage see PRTSTOR_TYPE_ */
|
|---|
| 907 | ULONG ulID; /* unique identifier for this type */
|
|---|
| 908 | ULONG ulSize; /* total storage in KBytes */
|
|---|
| 909 | ULONG ulAvail; /* available storage in KBytes */
|
|---|
| 910 | ULONG ulpszName; /* name of media, ex: font card name */
|
|---|
| 911 | ULONG ulpszDescription; /* description of storage */
|
|---|
| 912 | } PRTSTORAGE;
|
|---|
| 913 | typedef PRTSTORAGE FAR *PPRTSTORAGE;
|
|---|
| 914 |
|
|---|
| 915 | #define PRTSTOR_TYPE_CARTRIDGE 1
|
|---|
| 916 | #define PRTSTOR_TYPE_DISK 2
|
|---|
| 917 | #define PRTSTOR_TYPE_FLASH 4
|
|---|
| 918 | #define PRTSTOR_TYPE_OTHER 0xFFFFFFFE
|
|---|
| 919 | #define PRTSTOR_TYPE_UNKNOWN 0xFFFFFFFF
|
|---|
| 920 |
|
|---|
| 921 | /* BIDI_STARTJOB */
|
|---|
| 922 | typedef struct _PRTSTARTJOB {
|
|---|
| 923 | ULONG ulSpoolerJobID;
|
|---|
| 924 | ULONG ulInterpreterID;
|
|---|
| 925 | ULONG ulStartPage;
|
|---|
| 926 | ULONG ulEndPage;
|
|---|
| 927 | } PRTSTARTJOB;
|
|---|
| 928 | typedef PRTSTARTJOB FAR *PPRTSTARTJOB;
|
|---|
| 929 |
|
|---|
| 930 | /* BIDI_RESET values */
|
|---|
| 931 | #define PRTRESET_POWER_ON 1
|
|---|
| 932 | #define PRTRESET_SW_ONLY 2
|
|---|
| 933 | #define PRTRESET_POWER_ON_EXIT_SW 3
|
|---|
| 934 | #define PRTRESET_EXIT_SW 4
|
|---|
| 935 | #define PRTRESET_FACTORY_DEFAULTS 5
|
|---|
| 936 |
|
|---|
| 937 | /* BIDI_ENABLE_ALERT and BIDI_DISABLE_ALERT */
|
|---|
| 938 | typedef struct _PRTSETALERT {
|
|---|
| 939 | ULONG ulCategory;
|
|---|
| 940 | ULONG ulType;
|
|---|
| 941 | } PRTSETALERT;
|
|---|
| 942 | typedef PRTSETALERT FAR *PPRTSETALERT;
|
|---|
| 943 |
|
|---|
| 944 | /* Flags for ulType field when ulCategory is PRTALERT_CATEGORY_CORE */
|
|---|
| 945 | #define PRTALERT_CORE_INPUT 0x00000001
|
|---|
| 946 | #define PRTALERT_CORE_OUTPUT 0x00000002
|
|---|
| 947 | #define PRTALERT_CORE_JAM 0x00000004
|
|---|
| 948 | #define PRTALERT_CORE_OPERATOR 0x00000008
|
|---|
| 949 | #define PRTALERT_CORE_CONFIG_CHANGE 0x00000010
|
|---|
| 950 | #define PRTALERT_CORE_SUPPLIES 0x00000020
|
|---|
| 951 | #define PRTALERT_CORE_JOB_START 0x00000040
|
|---|
| 952 | #define PRTALERT_CORE_JOB_STACKED 0x00000080
|
|---|
| 953 | #define PRTALERT_CORE_PAGE_PRINTED 0x00000100
|
|---|
| 954 | #define PRTALERT_CORE_JOB_CANCELLED 0x00000200
|
|---|
| 955 | #define PRTALERT_CORE_JOB_HELD 0x00000400
|
|---|
| 956 | #define PRTALERT_CORE_COVER_OPEN 0x00000800
|
|---|
| 957 | #define PRTALERT_CORE_POWER_ON 0x00001000
|
|---|
| 958 | #define PRTALERT_CORE_RESET 0x00002000
|
|---|
| 959 | #define PRTALERT_CORE_ONLINE 0x00004000
|
|---|
| 960 | #define PRTALERT_CORE_OFFLINE 0x00008000
|
|---|
| 961 | #define PRTALERT_CORE_TIMED_ALERT 0x00010000
|
|---|
| 962 | #define PRTALERT_CORE_COMMUNICATION_PROBLEM 0x00020000
|
|---|
| 963 | #define PRTALERT_CORE_COMM_STATUS_CHANGED 0x00040000
|
|---|
| 964 |
|
|---|
| 965 | /*
|
|---|
| 966 | * Alert Info structure IN/OUT parameter to SplProtXlateCmd
|
|---|
| 967 | */
|
|---|
| 968 | typedef struct _PDALERTINFO {
|
|---|
| 969 | ULONG ulVersion; /* version of alert structure */
|
|---|
| 970 | ULONG ulFlags; /* alert flags */
|
|---|
| 971 | ULONG ulCommand; /* command structure returned */
|
|---|
| 972 | } PDALERTINFO;
|
|---|
| 973 | typedef PDALERTINFO FAR *PPDALERTINFO;
|
|---|
| 974 |
|
|---|
| 975 | /*
|
|---|
| 976 | * Structure returned by SplQmGetJobID
|
|---|
| 977 | */
|
|---|
| 978 | /*typedef struct _QMJOBINFO {
|
|---|
| 979 | ULONG ulJobID;
|
|---|
| 980 | PSZ pszComputerName;
|
|---|
| 981 | PSZ pszQueueName;
|
|---|
| 982 | } QMJOBINFO;
|
|---|
| 983 | typedef QMJOBINFO FAR *PQMJOBINFO;*/
|
|---|
| 984 |
|
|---|
| 985 | /*
|
|---|
| 986 | * New job information structure for level 4
|
|---|
| 987 | */
|
|---|
| 988 | /*typedef struct _PRJINFO4 {
|
|---|
| 989 | USHORT uJobId;
|
|---|
| 990 | USHORT uPriority;
|
|---|
| 991 | PSZ pszUserName;
|
|---|
| 992 | USHORT uPosition;
|
|---|
| 993 | USHORT fsStatus;
|
|---|
| 994 | ULONG ulSubmitted;
|
|---|
| 995 | ULONG ulSize;
|
|---|
| 996 | PSZ pszComment;
|
|---|
| 997 | PSZ pszDocument;
|
|---|
| 998 | PSZ pszSpoolFileName;
|
|---|
| 999 | PSZ pszPortName;
|
|---|
| 1000 | PSZ pszStatus;
|
|---|
| 1001 | ULONG ulPagesSpooled;
|
|---|
| 1002 | ULONG ulPagesSent;
|
|---|
| 1003 | ULONG ulPagesPrinted;
|
|---|
| 1004 | ULONG ulTimePrinted;
|
|---|
| 1005 | ULONG ulExtendJobStatus;
|
|---|
| 1006 | ULONG ulStartPage;
|
|---|
| 1007 | ULONG ulEndPage;
|
|---|
| 1008 | } PRJINFO4;
|
|---|
| 1009 | typedef PRJINFO4 FAR *PPRJINFO4;*/
|
|---|
| 1010 |
|
|---|
| 1011 | /*** Bitmap masks for ulExtendedJobStatus field of PRJINFO4. ************/
|
|---|
| 1012 | #define PRJ4_INPRINTER 0x00000001 /* Bit 0 */
|
|---|
| 1013 | #define PRJ4_STACKED 0x00000002 /* Bit 1 */
|
|---|
| 1014 | #define PRJ4_HELDINPRINTER 0x00000004 /* Bit 2 */
|
|---|
| 1015 | #define PRJ4_JOBSTARTED 0x00000008 /* Bit 3 */
|
|---|
| 1016 | #define PRJ4_BYTES_SENT 0x00000010 /* Bit 4 */
|
|---|
| 1017 |
|
|---|
| 1018 | /*** Parameter numbers for SplSetJob ************/
|
|---|
| 1019 | #define PRJ_SPOOLFILENAME_PARMNUM 19
|
|---|
| 1020 | #define PRJ_PAGESSPOOLED_PARMNUM 20
|
|---|
| 1021 | #define PRJ_PAGESSENT_PARMNUM 21
|
|---|
| 1022 | #define PRJ_PAGESPRINTED_PARMNUM 22
|
|---|
| 1023 | #define PRJ_TIMEPRINTED_PARMNUM 23
|
|---|
| 1024 | #define PRJ_EXTENDSTATUS_PARMNUM 24
|
|---|
| 1025 | #define PRJ_STARTPAGE_PARMNUM 25
|
|---|
| 1026 | #define PRJ_ENDPAGE_PARMNUM 26
|
|---|
| 1027 | #define PRJ_SET_EA_TYPE 27
|
|---|
| 1028 | #ifdef PRJ_MAXPARMNUM
|
|---|
| 1029 | #undef PRJ_MAXPARMNUM
|
|---|
| 1030 | #endif
|
|---|
| 1031 | #define PRJ_MAXPARMNUM 27
|
|---|
| 1032 |
|
|---|
| 1033 |
|
|---|
| 1034 | /*
|
|---|
| 1035 | * Flag returned by SplQpQueryFlags if queue driver can print separator pages
|
|---|
| 1036 | */
|
|---|
| 1037 | #define QP_PRINT_SEPARATOR_PAGE 0x00000002
|
|---|
| 1038 |
|
|---|
| 1039 | /*
|
|---|
| 1040 | * Flag bits for ulFlags parameter to SplQpPrintSeparator
|
|---|
| 1041 | */
|
|---|
| 1042 | #define QP_SEPFLAGS_NONEWPAGE 0x00000001
|
|---|
| 1043 | #define QP_SEPFLAGS_RESETNONE 0x00000002
|
|---|
| 1044 | #define QP_SEPFLAGS_RESETPRE_JOBPROPS 0x00000004
|
|---|
| 1045 | #define QP_SEPFLAGS_RESETPRE_PRTPROPS 0x00000008
|
|---|
| 1046 | #define QP_SEPFLAGS_RESETPOST_JOBPROPS 0x00000010
|
|---|
| 1047 | #define QP_SEPFLAGS_RESETPOST_PRTPROPS 0x00000020
|
|---|
| 1048 |
|
|---|
| 1049 |
|
|---|
| 1050 | /*
|
|---|
| 1051 | * PrtQuery and PrtSet command values
|
|---|
| 1052 | */
|
|---|
| 1053 | #define BIDI_SEND_PASSTHRU 0x00000001
|
|---|
| 1054 | #define BIDI_STARTJOB 0x00000002
|
|---|
| 1055 | #define BIDI_ENDJOB 0x00000003
|
|---|
| 1056 | #define BIDI_HOLDJOB 0x00000004
|
|---|
| 1057 | #define BIDI_RELEASEJOB 0x00000005
|
|---|
| 1058 | #define BIDI_CANCELJOB 0x00000006
|
|---|
| 1059 | #define BIDI_INIT_PORTDRV 0x00000008
|
|---|
| 1060 | #define BIDI_RESET 0x00000009
|
|---|
| 1061 | #define BIDI_SHUTDOWN 0x0000000A
|
|---|
| 1062 | #define BIDI_INIT 0x0000000B
|
|---|
| 1063 | #define BIDI_TERM 0x0000000C
|
|---|
| 1064 | #define BIDI_RESPONSE_FMT 0x0000000D
|
|---|
| 1065 | #define BIDI_PACKET_SIZE 0x0000000E
|
|---|
| 1066 | #define BIDI_INIT_PROTCNV 0x0000000F
|
|---|
| 1067 | #define BIDI_SET_SW 0x00000010
|
|---|
| 1068 | #define BIDI_SET_PORTDRV 0x00000019
|
|---|
| 1069 | #define BIDI_START_PASSTHRU 0x0000001A
|
|---|
| 1070 | #define BIDI_END_PASSTHRU 0x0000001B
|
|---|
| 1071 | #define BIDI_NOTIFY_ENDJOBCONNECT 0x00000020
|
|---|
| 1072 | #define BIDI_NOTIFY_PORT_SELECTED 0x00000021
|
|---|
| 1073 | #define BIDI_NOTIFY_PORT_RELEASED 0x00000022
|
|---|
| 1074 | #define BIDI_SET_DEVICE_ID 0x00000023
|
|---|
| 1075 | #define BIDI_ENABLE_ALERT 0x00000024
|
|---|
| 1076 | #define BIDI_DISABLE_ALERT 0x00000025
|
|---|
| 1077 | #define BIDI_ADD_VIRTUAL_PORT 0x00000026
|
|---|
| 1078 | #define BIDI_DEL_VIRTUAL_PORT 0x00000027
|
|---|
| 1079 | #define BIDI_DEL_PORT 0x00000028
|
|---|
| 1080 |
|
|---|
| 1081 | #define BIDI_READ_PASSTHRU 0x00008001
|
|---|
| 1082 | #define BIDI_Q_PORT 0x0000800B
|
|---|
| 1083 | #define BIDI_Q_SW 0x0000800C
|
|---|
| 1084 | #define BIDI_Q_DEVICE 0x0000800D
|
|---|
| 1085 | #define BIDI_Q_INTERPRETER 0x0000800E
|
|---|
| 1086 | #define BIDI_Q_INPUTBINS 0x0000800F
|
|---|
| 1087 | #define BIDI_Q_OUTPUTBINS 0x00008010
|
|---|
| 1088 | #define BIDI_Q_FONTS 0x00008012
|
|---|
| 1089 | #define BIDI_Q_JOBS_COMPLETE 0x00008013
|
|---|
| 1090 | #define BIDI_Q_JOBS_QUEUED 0x00008014
|
|---|
| 1091 | #define BIDI_Q_STATUS 0x00008015
|
|---|
| 1092 | #define BIDI_WAIT_ALERT 0x00008016
|
|---|
| 1093 | #define BIDI_Q_JOBID 0x00008017
|
|---|
| 1094 | #define BIDI_Q_RESPONSE_FMT 0x00008018
|
|---|
| 1095 | #define BIDI_Q_PORTDRV 0x00008019
|
|---|
| 1096 | #define BIDI_READ_ALERT 0x0000801D
|
|---|
| 1097 | #define BIDI_Q_CONVERTER_INFO 0x00008021
|
|---|
| 1098 | #define BIDI_Q_SPOOLER_VERSION 0x00008022
|
|---|
| 1099 | #define BIDI_Q_STORAGE 0x00008023
|
|---|
| 1100 | /*
|
|---|
| 1101 | * Range of protocol converter specific IDs are 0x9000 - 0x9FFF
|
|---|
| 1102 | */
|
|---|
| 1103 | #define BIDI_Q_PROTCNV 0x00009000
|
|---|
| 1104 | #define BIDI_SET_PROTCNV 0x00009001
|
|---|
| 1105 | #define BIDI_MAX_PROTCNV 0x00009FFF
|
|---|
| 1106 |
|
|---|
| 1107 | /*
|
|---|
| 1108 | * Range of commands reserved for the spooler 0xA000 - 0xAFFF
|
|---|
| 1109 | */
|
|---|
| 1110 | #define BIDI_MIN_SPLRCMD 0x0000A000
|
|---|
| 1111 | #define BIDI_MAX_SPLRCMD 0x0000AFFF
|
|---|
| 1112 | /*
|
|---|
| 1113 | * Spooler Specific PrtQuery/Set commands
|
|---|
| 1114 | */
|
|---|
| 1115 |
|
|---|
| 1116 | #define BIDI_GETPORTFROMQ 0x0000A001
|
|---|
| 1117 | #define BIDI_SET_PORTSTATUS 0x0000A002
|
|---|
| 1118 | #define BIDI_Q_PORTSTATUS 0x0000A003
|
|---|
| 1119 | #define BIDI_START_CLIENT_REG 0x0000A004
|
|---|
| 1120 | #define BIDI_START_REMOTE_PIPE 0x0000A005
|
|---|
| 1121 | #define BIDI_TERM_CLIENT_REG 0x0000A006
|
|---|
| 1122 | #define BIDI_REMOTE_REGISTER 0x0000A007
|
|---|
| 1123 | #define BIDI_REMOTE_UNREGISTER 0x0000A008
|
|---|
| 1124 | #define BIDI_GET_PORT_DESCRIPTION 0x0000A009
|
|---|
| 1125 | #define BIDI_SPLQUERYPORT 0x0000A00A
|
|---|
| 1126 | #define BIDI_SPLSETPORT 0x0000A00B
|
|---|
| 1127 | #define BIDI_GET_INISPOOLER_PTR 0x0000A00C
|
|---|
| 1128 | #define BIDI_SET_IPC_TIMEOUT 0x0000A00D
|
|---|
| 1129 | #define BIDI_GET_DRIVER_VERSION 0x0000A00E
|
|---|
| 1130 | #define BIDI_GET_GRE_VERSION 0x0000A00F
|
|---|
| 1131 | #define BIDI_GET_DEST_Q 0x0000A015
|
|---|
| 1132 | #define BIDI_SET_DEST_Q 0x0000A016
|
|---|
| 1133 | #define BIDI_GET_SEPTRAY_SUPPORT 0x0000A017
|
|---|
| 1134 | #define BIDI_SET_SEPTRAY_SUPPORT 0x0000A018
|
|---|
| 1135 | //
|
|---|
| 1136 | // The following are used by port drivers that open the adapter.
|
|---|
| 1137 | // They use PortName "ADAPTER0" - "ADAPTER16" when opening the
|
|---|
| 1138 | // adapter, giving the spooler the DLC info( BIDI_GIVE_ADAPTER_INFO )
|
|---|
| 1139 | // and when they are the 2nd port driver to open the adapter,
|
|---|
| 1140 | // they get the DLC info( BIDI_GET_ADAPTER_INFO )
|
|---|
| 1141 | //
|
|---|
| 1142 | #define BIDI_GIVE_ADAPTER_INFO 0x0000A010
|
|---|
| 1143 | #define BIDI_GET_ADAPTER_INFO 0x0000A011
|
|---|
| 1144 |
|
|---|
| 1145 |
|
|---|
| 1146 | /*
|
|---|
| 1147 | * Structures for PrtQuery/PrtSet Spooler commands
|
|---|
| 1148 | */
|
|---|
| 1149 |
|
|---|
| 1150 | /* BIDI_GET_DEST_Q */
|
|---|
| 1151 | typedef struct _PRTGETDESTQ {
|
|---|
| 1152 | ULONG flSettings;
|
|---|
| 1153 | CHAR szQueueName[CCHMAXPATH];
|
|---|
| 1154 | } PRTGETDESTQ;
|
|---|
| 1155 | typedef PRTGETDESTQ FAR *PPRTGETDESTQ;
|
|---|
| 1156 |
|
|---|
| 1157 | #define PRTGETDESTQ_SET_IN_INIFILE 0x00000001
|
|---|
| 1158 | #define PRTGETDESTQ_SET_TO_QUEUE 0x00000002
|
|---|
| 1159 | #define PRTGETDESTQ_SET_TO_PORT 0x00000004
|
|---|
| 1160 |
|
|---|
| 1161 | /* BIDI_SET_DEST_Q */
|
|---|
| 1162 | typedef struct _PRTSETDESTQ {
|
|---|
| 1163 | CHAR szQueueName[CCHMAXPATH];
|
|---|
| 1164 | } PRTSETDESTQ;
|
|---|
| 1165 | typedef PRTSETDESTQ FAR *PPRTSETDESTQ;
|
|---|
| 1166 |
|
|---|
| 1167 | /* BIDI_GET_SEPTRAY_SUPPORT */
|
|---|
| 1168 | /* BIDI_SET_SEPTRAY_SUPPORT */
|
|---|
| 1169 | typedef struct _SEPTRAY_NAME {
|
|---|
| 1170 | CHAR szTrayname[32]; /* System Tray name */
|
|---|
| 1171 | CHAR szDisplayTrayname[64]; /* Display Tray name (translated) */
|
|---|
| 1172 | } SEPTRAY_NAME;
|
|---|
| 1173 | typedef SEPTRAY_NAME FAR *PSEPTRAY_NAME;
|
|---|
| 1174 |
|
|---|
| 1175 | typedef struct _GETSEPTRAY {
|
|---|
| 1176 | ULONG flSettings; /* see GETSEPTRAY_ below */
|
|---|
| 1177 | ULONG ulTrays; /* number of SEPTRAY_NAME structs that follow */
|
|---|
| 1178 | /* if GETSEPTRAY_INTRAY_SELECTED set */
|
|---|
| 1179 | /* then first tray in list is selected one */
|
|---|
| 1180 | SEPTRAY_NAME sepTray[1]; /* ulTrays = number of trays */
|
|---|
| 1181 | } GETSEPTRAY;
|
|---|
| 1182 | typedef GETSEPTRAY FAR *PGETSEPTRAY;
|
|---|
| 1183 |
|
|---|
| 1184 | #define GETSEPTRAY_INTRAY_SELECTED 0x00000001
|
|---|
| 1185 | #define GETSEPTRAY_INTRAY_INVALID 0x00000002
|
|---|
| 1186 |
|
|---|
| 1187 |
|
|---|
| 1188 | /*
|
|---|
| 1189 | * Range of port driver specific IDs are 0xB000 - 0xBFFF
|
|---|
| 1190 | */
|
|---|
| 1191 | #define BIDI_MIN_PORTDRV 0x0000B000
|
|---|
| 1192 | #define BIDI_MAX_PORTDRV 0x0000BFFF
|
|---|
| 1193 |
|
|---|
| 1194 |
|
|---|
| 1195 | /*
|
|---|
| 1196 | * PrtOpen flag set if a PRTOPENSTRUCT0 is given
|
|---|
| 1197 | */
|
|---|
| 1198 | #define OPEN_WITH_JOB_OPTIONS 0x0200
|
|---|
| 1199 |
|
|---|
| 1200 | /*
|
|---|
| 1201 | * PrtAbortDoc/SplPdAbortDoc flag set when prior writes must complete
|
|---|
| 1202 | * before aborting the print job
|
|---|
| 1203 | */
|
|---|
| 1204 | #define FLG_COMPLETE_DATA 0x00000001
|
|---|
| 1205 |
|
|---|
| 1206 | /*
|
|---|
| 1207 | * Type values for PrtQuery/PrtSet/SplPdQuery/SplPdSet/SplProtSendCmd
|
|---|
| 1208 | */
|
|---|
| 1209 | #define TYPE_CACHE_ONLY 0
|
|---|
| 1210 | #define TYPE_SHORT_WAIT 1
|
|---|
| 1211 | #define TYPE_LONG_WAIT 2
|
|---|
| 1212 | #define TYPE_CACHE_UPDATE 3
|
|---|
| 1213 | #define TYPE_WITHOUT_WRAPPER 4
|
|---|
| 1214 |
|
|---|
| 1215 | /*
|
|---|
| 1216 | * Flags for SplPdSendCmd
|
|---|
| 1217 | */
|
|---|
| 1218 | #define FLG_MUSTCOMPLETE 0x00000001
|
|---|
| 1219 | #define FLG_SYNCH 0x00000002
|
|---|
| 1220 | #define FLG_MORECMDS 0x00000004
|
|---|
| 1221 | #define FLG_DATACHANNEL 0x00000008
|
|---|
| 1222 | #define FLG_SNMPCHANNEL 0x00000010
|
|---|
| 1223 | #define FLG_RESERVEDCHANNEL 0x00000020
|
|---|
| 1224 |
|
|---|
| 1225 | /*
|
|---|
| 1226 | * Flags in PDALERTINFO structure for SplProtXlateCmd
|
|---|
| 1227 | */
|
|---|
| 1228 | #define PD_ALERT 0x00000001
|
|---|
| 1229 | #define PD_RESPONSE 0x00000002
|
|---|
| 1230 | #define PD_PARTIAL 0x00000004
|
|---|
| 1231 | #define PD_SNMP 0x00000008
|
|---|
| 1232 | #define PD_ALTERNATE 0x00000010
|
|---|
| 1233 | #define PD_IGNORE 0x00000020
|
|---|
| 1234 | #define PD_NEXTALERT 0x00001000
|
|---|
| 1235 | #define PD_MOREALERTS 0x00002000
|
|---|
| 1236 |
|
|---|
| 1237 | #define NOT_ENOUGH_DATA 0xFFFFFFFF
|
|---|
| 1238 |
|
|---|
| 1239 | /*
|
|---|
| 1240 | * Message ID posted to Application window after SplRegister
|
|---|
| 1241 | */
|
|---|
| 1242 | #define WM_SPOOLER_ALERT 0x00d8
|
|---|
| 1243 | /*
|
|---|
| 1244 | * MP1 will define the type of alert as follows:
|
|---|
| 1245 | */
|
|---|
| 1246 | /* Alert type - SHORT1FROMMP(MP1) bits 0 - 7 */
|
|---|
| 1247 |
|
|---|
| 1248 | #define SPLMSG_SPECIAL_ALERT 0x00FC
|
|---|
| 1249 | #define SPLMSG_EXTENDED_ALERT 0x00FD
|
|---|
| 1250 | #define SPLMSG_CORE_ALERT_MASK 0x00FF
|
|---|
| 1251 |
|
|---|
| 1252 | /* Extended alert type - SHORT1FROMMP(MP1) bits 8 - 15 */
|
|---|
| 1253 |
|
|---|
| 1254 | #define SPLMSG_EXTENDED_TYPE_MASK 0xFF00
|
|---|
| 1255 |
|
|---|
| 1256 | /* Special alert type - SHORT2FROMMP(MP1) bits 0 - 15 */
|
|---|
| 1257 |
|
|---|
| 1258 | #define SPLMSG_SPOOLER_DISABLED 0x0001
|
|---|
| 1259 | #define SPLMSG_CONNECTION_LOST 0x0002
|
|---|
| 1260 | #define SPLMSG_PORT_TERMINATED 0x0003
|
|---|
| 1261 |
|
|---|
| 1262 | /* Core alert Page number printed - SHORT1FROMMP(MP1) bits 8 - 15 */
|
|---|
| 1263 |
|
|---|
| 1264 | #define SPLMSG_PAGE_PRINTED_MASK 0xFF00
|
|---|
| 1265 |
|
|---|
| 1266 | /* Core alert severity - SHORT1FROMMP(MP1) bits 8 - 15 */
|
|---|
| 1267 |
|
|---|
| 1268 | #define SPLMSG_CORE_SEVERITY_MASK 0xFF00
|
|---|
| 1269 |
|
|---|
| 1270 | /*
|
|---|
| 1271 | * Old defines for print object
|
|---|
| 1272 | */
|
|---|
| 1273 |
|
|---|
| 1274 | /* All jobs in given Queue are affected */
|
|---|
| 1275 | #define SPLMSG_ALL 0x0040
|
|---|
| 1276 |
|
|---|
| 1277 | /* Object type - SHORT1FROMMP(MP1) bits 8 - 11 */
|
|---|
| 1278 |
|
|---|
| 1279 | #define SPLMSG_QUEUE 0x0100
|
|---|
| 1280 | #define SPLMSG_JOB 0x0200
|
|---|
| 1281 | #define SPLMSG_PORT 0x0300
|
|---|
| 1282 | #define SPLMSG_PORTDRV 0x0900
|
|---|
| 1283 | #define SPLMSG_SPOOLER 0x0A00
|
|---|
| 1284 | #define SPLMSG_OBJECT_MASK 0x0F00
|
|---|
| 1285 |
|
|---|
| 1286 | /* Action type - SHORT1FROMMP(MP1) bits 12 - 15 */
|
|---|
| 1287 |
|
|---|
| 1288 | #define SPLMSG_ADD 0x1000
|
|---|
| 1289 | #define SPLMSG_CHANGE 0x2000
|
|---|
| 1290 | #define SPLMSG_DELETE 0x3000
|
|---|
| 1291 | #define SPLMSG_HOLD 0x4000
|
|---|
| 1292 | #define SPLMSG_RELEASE 0x5000
|
|---|
| 1293 | #define SPLMSG_JOBSTARTED 0x6000
|
|---|
| 1294 | #define SPLMSG_PAGEPRINTED 0x7000
|
|---|
| 1295 | #define SPLMSG_JOBSTACKED 0x8000
|
|---|
| 1296 | #define SPLMSG_PAGESSPOOLED 0x9000
|
|---|
| 1297 | #define SPLMSG_PAGESSENT 0xA000
|
|---|
| 1298 | #define SPLMSG_ACTION_MASK 0xF000
|
|---|
| 1299 |
|
|---|
| 1300 |
|
|---|
| 1301 | /*
|
|---|
| 1302 | * Printer alert value when SPLMSG_PORT in SHORT2FROMMP(MP1) bits 16-31
|
|---|
| 1303 | */
|
|---|
| 1304 | #define PORT_ALERT_RESERVED 0x0001
|
|---|
| 1305 | #define PORT_ALERT_POWER_ON 0x0002
|
|---|
| 1306 | #define PORT_ALERT_ONLINE 0x0004
|
|---|
| 1307 | #define PORT_ALERT_BIDI_ENABLED 0x0008
|
|---|
| 1308 | #define PORT_ALERT_BIDI_DISABLED 0x0010
|
|---|
| 1309 | #define PORT_ALERT_RESERVE_CNV 0x00D0
|
|---|
| 1310 | #define PORT_ALERT_OUT_OF_PAPER 0x0100
|
|---|
| 1311 | #define PORT_ALERT_PAPER_JAM 0x0200
|
|---|
| 1312 | #define PORT_ALERT_COVER_OPEN 0x0400
|
|---|
| 1313 |
|
|---|
| 1314 | /*
|
|---|
| 1315 | * Msg number send to print object when port's description is changed
|
|---|
| 1316 | */
|
|---|
| 1317 | /* Parmnum for port desc change */
|
|---|
| 1318 | #define SPLMSG_PARMNUM_PORTDESC 0x0002 /* SPLMSG_PORT+SPLMSG_CHANGE+ */
|
|---|
| 1319 |
|
|---|
| 1320 | /* Action type for WPPO msg */
|
|---|
| 1321 | #define SPLMSG_ALERT 0x6000 /* when Bidi alert for port */
|
|---|
| 1322 |
|
|---|
| 1323 |
|
|---|
| 1324 | /*
|
|---|
| 1325 | * Spooler API for use by print object only
|
|---|
| 1326 | */
|
|---|
| 1327 | ULONG APIENTRY SplGetPortFromQ(PSZ pszComputerName,
|
|---|
| 1328 | PSZ pszQueueName,
|
|---|
| 1329 | ULONG ulLevel,
|
|---|
| 1330 | PVOID pBuf,
|
|---|
| 1331 | ULONG cbBuf,
|
|---|
| 1332 | PULONG pcbNeeded);
|
|---|
| 1333 | /*
|
|---|
| 1334 | * Structure returned by SplGetPortFromQ for level 1:
|
|---|
| 1335 | */
|
|---|
| 1336 |
|
|---|
| 1337 | typedef struct _PORTFROMQ {
|
|---|
| 1338 | PSZ pszComputer; /* name of computer port exists on */
|
|---|
| 1339 | PSZ pszPort; /* name of port connected to Q */
|
|---|
| 1340 | PSZ pszDeviceID; /* device ID returned by Bidi capable printer */
|
|---|
| 1341 | ULONG flBidiCapabilities; /* see PRTPORT_CAPS_ defines */
|
|---|
| 1342 | ULONG flJobs ; /* job control flags, see PRTSW_JOB_ defines */
|
|---|
| 1343 | } PORTFROMQ;
|
|---|
| 1344 | typedef PORTFROMQ FAR *PPORTFROMQ;
|
|---|
| 1345 |
|
|---|
| 1346 | typedef struct _GETPORTFROMQ {
|
|---|
| 1347 | ULONG ulPorts; /* Number of port connected to this print queue */
|
|---|
| 1348 | PORTFROMQ PortFromQ[1]; /* Array(size ulPorts) of ports connected to queue */
|
|---|
| 1349 | } GETPORTFROMQ;
|
|---|
| 1350 | typedef GETPORTFROMQ FAR *PGETPORTFROMQ;
|
|---|
| 1351 |
|
|---|
| 1352 |
|
|---|
| 1353 |
|
|---|
| 1354 | /*
|
|---|
| 1355 | * The following go along with bsedos.h
|
|---|
| 1356 | */
|
|---|
| 1357 | #define HANDTYPE_LPTDEVICE 0x0004
|
|---|
| 1358 | #define HANDTYPE_COMDEVICE 0x0008
|
|---|
| 1359 |
|
|---|
| 1360 |
|
|---|
| 1361 | /*
|
|---|
| 1362 | * The following go into pmerr.h
|
|---|
| 1363 | */
|
|---|
| 1364 | #define PMERR_SPL_PORT_SHUTDOWN 0x403B
|
|---|
| 1365 | #define PMERR_SPL_NOT_HANDLED 0x403C
|
|---|
| 1366 | #define PMERR_SPL_CNV_NOT_INIT 0x403D
|
|---|
| 1367 | #define PMERR_SPL_INIT_IN_PROGRESS 0x403E
|
|---|
| 1368 | #define PMERR_SPL_TYPE_NOT_AVAIL 0x403F
|
|---|
| 1369 | #define PMERR_SPL_SESSION_TERM 0x4041
|
|---|
| 1370 | #define PMERR_SPL_NOT_REGISTERED 0x4042
|
|---|
| 1371 |
|
|---|
| 1372 |
|
|---|
| 1373 | /*
|
|---|
| 1374 | * The following go into pmdev.h
|
|---|
| 1375 | */
|
|---|
| 1376 | #define DEVESC_GETJOBID 8160L
|
|---|
| 1377 | #define DEVESC_SEP 16305L
|
|---|
| 1378 | #define DEVESC_PROPERTIES 16306L
|
|---|
| 1379 | #define DEVESC_MACRO 16307L
|
|---|
| 1380 |
|
|---|
| 1381 | #define USE_JOB_PROPS 1
|
|---|
| 1382 | #define USE_PRINTER_PROPS 2
|
|---|
| 1383 |
|
|---|
| 1384 | #endif /* PMSPLNEWH */
|
|---|