Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

248 lines
8.3 KiB

  1. /*****************************************************************/
  2. /** Microsoft Windows for Workgroups **/
  3. /** Copyright (C) Microsoft Corp., 1991-1992 **/
  4. /*****************************************************************/
  5. #ifndef _spl_wnt_h_
  6. #define _spl_wnt_h_
  7. /*
  8. * Print Manager Administration APIs
  9. * for later inclusion into WINNET.H once they settle down
  10. *
  11. * JONN 4/19/91 Trimmed out unnecessary stuff
  12. * JONN 5/3/91 Added type WNETERR
  13. */
  14. /*
  15. Codes for WNetPrintMgrSelNotify's "type" variable, indicating
  16. what's selected: a queue, a job, or nothing.
  17. */
  18. #define WNPMSEL_NOTHING 0
  19. #define WNPMSEL_QUEUE 1
  20. #define WNPMSEL_JOB 2
  21. #define PRIORITY 10 /* menu uses 10, 11, 12, 13 */
  22. #define ABOUT 24
  23. #define EXIT 25
  24. #define PRINT_LOG 28
  25. #define NETWORK 29
  26. #define HELP_NDEX 30
  27. #define HELP_MOUSE 31
  28. #define HELP_KEYBOARD 32
  29. #define HELP_HELP 33
  30. #define HELP_COMMANDS 34
  31. #define HELP_PROCEDURES 35
  32. #define SHOW_TIME 51
  33. #define SHOW_SIZE 52
  34. #define SHOW_DETAIL 53
  35. #define UPDATE 54
  36. #define SHOW_LOCAL 55
  37. #define SHOW_NET 56
  38. #define SHOW_QUEUE 57
  39. #define SHOW_OTHER 58
  40. #define ALERT_ALWAYS 100
  41. #define ALERT_FLASH 101
  42. #define ALERT_IGNORE 102
  43. #define PRT_SETUP 8001 // These have to match the stuff in control
  44. #define NETWK_CONNECTIONS 8021 // panel
  45. #define PM_REFRESH WM_USER + 100 // BUGBUG: Need to define proper manifest
  46. #define PM_SELQUEUE WM_USER + 101
  47. #define PM_QUERYSEL WM_USER + 102
  48. typedef struct _wnpmsel { /* structure returned by PM_QUERYSEL */
  49. WORD wJobID;
  50. char szQueueName [260]; /* in the form "LPT1\0HP LaserJet III\0" */
  51. } WNPMSEL, far *LPWNPMSEL;
  52. #define IDM_PROPERTIES 202
  53. #define IDM_CHANGE_MENUS 212
  54. /*
  55. * added JONN 2/26/91
  56. * Print Manager Extensions
  57. */
  58. typedef struct _queuestruct2
  59. {
  60. WORD pq2Name; /* offset to queue name */
  61. /* in the form "LPT1\0HP LaserJet III\0" */
  62. WORD pq2Comment; /* offset to queue comment */
  63. WORD pq2Driver; /* offset to driver name */
  64. WORD pq2Status; /* status flags */
  65. WORD pq2Jobcount; /* number of jobs in this queue */
  66. WORD pq2Flags; /* miscellaneous flags */
  67. } QUEUESTRUCT2, FAR *LPQS2;
  68. #define QNAME(buf,qs) ((LPSTR)(buf) + (qs).pq2Name)
  69. #define QCOMMENT(buf,qs) ((LPSTR)(buf) + (qs).pq2Comment)
  70. #define QDRIVER(buf,qs) ((LPSTR)(buf) + (qs).pq2Driver)
  71. #define QF_REDIRECTED 0x0001
  72. #define QF_SHARED 0x0002
  73. typedef struct _jobstruct2 {
  74. WORD pj2Id; // job ID
  75. WORD pj2Username; // name of owner (offset to string)
  76. // WORD pj2Parms;
  77. WORD pj2Position; // 0-based position in queue
  78. WORD pj2Status; // status flags (WNPRJ_XXXXX)
  79. DWORD pj2Submitted;
  80. DWORD pj2Size; // size of job in bytes
  81. DWORD pj2SubmitSize; // bytes submitted so far
  82. // WORD pj2Copies;
  83. WORD pj2Comment; // comment/app name (offset to string)
  84. WORD pj2Document; // document name (offset to string)
  85. WORD pj2StatusText; // verbose status (offset to string)
  86. WORD pj2PrinterName; // name of port job is printing on (offs to str)
  87. } JOBSTRUCT2;
  88. typedef JOBSTRUCT2 far * LPJOBSTRUCT2;
  89. #define JOBNAME(buf,job) ((LPSTR)(buf) + (job).pj2Username)
  90. #define JOBCOMMENT(buf,job) ((LPSTR)(buf) + (job).pj2Comment)
  91. #define JOBDOCUMENT(buf,job) ((LPSTR)(buf) + (job).pj2Document)
  92. #define JOBSTATUS(buf,job) ((LPSTR)(buf) + (job).pj2StatusText)
  93. #define JOBPRINTER(buf,job) ((LPSTR)(buf) + (job).pj2PrinterName)
  94. /*
  95. * Type WNETERR distinguishes WN_ error codes from other WORD
  96. * values. Added JONN 5/3/91
  97. */
  98. typedef WORD WNETERR;
  99. // new Print Manager Extensions APIs
  100. /* All queue names are in the form "LPT1\0HP LaserJet III\0" */
  101. #ifdef C700
  102. extern void far pascal __loadds WNetPrintMgrSelNotify (BYTE, LPQS2, LPQS2,
  103. LPJOBSTRUCT2, LPJOBSTRUCT2, LPWORD, LPSTR, WORD);
  104. extern WNETERR far pascal __loadds WNetPrintMgrPrinterEnum (LPSTR lpszQueueName,
  105. LPSTR lpBuffer, LPWORD pcbBuffer, LPWORD cAvail, WORD usLevel);
  106. extern WNETERR far pascal __loadds WNetPrintMgrChangeMenus(HWND, HANDLE FAR *, BOOL FAR *);
  107. extern WNETERR far pascal __loadds WNetPrintMgrCommand (HWND, WORD);
  108. extern void far pascal __loadds WNetPrintMgrExiting (void);
  109. extern BOOL far pascal __loadds WNetPrintMgrExtHelp (DWORD);
  110. extern WORD far pascal __loadds WNetPrintMgrMoveJob (HWND, LPSTR, WORD, int);
  111. #else
  112. extern void API WNetPrintMgrSelNotify (BYTE, LPQS2, LPQS2,
  113. LPJOBSTRUCT2, LPJOBSTRUCT2,
  114. LPWORD, LPSTR, WORD);
  115. extern WNETERR API WNetPrintMgrPrinterEnum (LPSTR lpszQueueName,
  116. LPSTR lpBuffer, LPWORD pcbBuffer,
  117. LPWORD cAvail, WORD usLevel);
  118. extern WNETERR API WNetPrintMgrChangeMenus(HWND, HANDLE FAR *, BOOL FAR *);
  119. extern WNETERR API WNetPrintMgrCommand (HWND, WORD);
  120. extern void API WNetPrintMgrExiting (void);
  121. extern BOOL API WNetPrintMgrExtHelp (DWORD);
  122. extern WORD API WNetPrintMgrMoveJob (HWND, LPSTR, WORD, int);
  123. #endif
  124. #define WINBALL
  125. #ifdef WINBALL
  126. #define WNNC_PRINTMGRNOTIFY 0x000C
  127. #ifdef C700
  128. extern void far pascal __loadds WNetPrintMgrStatusChange (LPSTR lpszQueueName,
  129. LPSTR lpszPortName, WORD wQueueStatus, WORD cJobsLeft, HANDLE hJCB,
  130. BOOL fDeleted);
  131. #else
  132. extern void API WNetPrintMgrStatusChange (LPSTR lpszQueueName,
  133. LPSTR lpszPortName,
  134. WORD wQueueStatus,
  135. WORD cJobsLeft,
  136. HANDLE hJCB,
  137. BOOL fDeleted);
  138. #endif
  139. #define PM_QUERYQDATA WM_USER + 104
  140. typedef struct _PMQUEUE {
  141. WORD dchPortName; /* offset to port name string */
  142. WORD dchPrinterName; /* offset to printer name string */
  143. WORD dchRemoteName; /* offset to remote name string */
  144. WORD cJobs; /* count of jobs */
  145. WORD fwStatus; /* queue status */
  146. } PMQUEUE, FAR *LPPMQUEUE;
  147. #define PMQPORTNAME(buf,queue) ((LPSTR)(buf) + (queue).dchPortName)
  148. #define PMQPRINTERNAME(buf,queue) ((LPSTR)(buf) + (queue).dchPrinterName)
  149. #define PMQREMOTENAME(buf,queue) ((LPSTR)(buf) + (queue).dchRemoteName)
  150. typedef struct _PMJOB {
  151. DWORD dwTime; /* date/time job was spooled */
  152. DWORD cbJob; /* job size in bytes */
  153. DWORD cbSubmitted; /* bytes submitted so far */
  154. WORD dchJobName; /* offset to job name (doc name) string */
  155. HANDLE hJCB; /* hJCB to refer to the job */
  156. } PMJOB, FAR *LPPMJOB;
  157. #define PMJOBNAME(buf,job) ((LPSTR)(buf) + (job).dchJobName)
  158. #endif
  159. // new values for WNetGetCaps()
  160. #define WNNC_PRINTMGREXT 0x000B
  161. // returns extensions version number, re: GetVersion(),
  162. // or 0 if not supported
  163. // QUEUESTRUCT2.pq2Status and .pq2Jobcount for WNetPrintMgrPrinterEnum[2]
  164. #define WNQ_UNKNOWN -1
  165. #define WNPRS_CANPAUSE 0x0001
  166. #define WNPRS_CANRESUME 0x0002
  167. #define WNPRS_CANDELETE 0x0004
  168. #define WNPRS_CANMOVE 0x0008
  169. #define WNPRS_CANDISCONNECT 0x0010
  170. #define WNPRS_CANSTOPSHARE 0x0020
  171. #define WNPRS_ISPAUSED 0x0040
  172. #define WNPRS_ISRESUMED 0x0080
  173. // help contexts, were previously in sphelp.h
  174. #define IDH_HELPFIRST 5000
  175. #define IDH_SYSMENU (IDH_HELPFIRST + 2000)
  176. #define IDH_MBFIRST (IDH_HELPFIRST + 2001)
  177. #define IDH_MBLAST (IDH_HELPFIRST + 2099)
  178. #define IDH_DLGFIRST (IDH_HELPFIRST + 3000)
  179. #define IDH_PRIORITY (IDH_HELPFIRST + PRIORITY )
  180. #define IDH_PRIORITY1 (IDH_HELPFIRST + PRIORITY + 1)
  181. #define IDH_PRIORITY2 (IDH_HELPFIRST + PRIORITY + 2)
  182. #define IDH_ABOUT (IDH_HELPFIRST + ABOUT )
  183. #define IDH_EXIT (IDH_HELPFIRST + EXIT)
  184. #define IDH_NETWORK (IDH_HELPFIRST + NETWORK)
  185. #define IDH_HELP_NDEX (IDH_HELPFIRST + HELP_NDEX)
  186. #define IDH_HELP_MOUSE (IDH_HELPFIRST + HELP_MOUSE)
  187. #define IDH_HELP_KEYBOARD (IDH_HELPFIRST + HELP_KEYBOARD)
  188. #define IDH_HELP_HELP (IDH_HELPFIRST + HELP_HELP)
  189. #define IDH_HELP_COMMANDS (IDH_HELPFIRST + HELP_COMMANDS)
  190. #define IDH_HELP_PROCEDURES (IDH_HELPFIRST + HELP_PROCEDURES)
  191. #define IDH_SHOW_TIME (IDH_HELPFIRST + SHOW_TIME)
  192. #define IDH_SHOW_SIZE (IDH_HELPFIRST + SHOW_SIZE)
  193. #define IDH_UPDATE (IDH_HELPFIRST + UPDATE)
  194. #define IDH_SHOW_QUEUE (IDH_HELPFIRST + SHOW_QUEUE)
  195. #define IDH_SHOW_OTHER (IDH_HELPFIRST + SHOW_OTHER)
  196. #define IDH_ALERT_ALWAYS (IDH_HELPFIRST + ALERT_ALWAYS)
  197. #define IDH_ALERT_FLASH (IDH_HELPFIRST + ALERT_FLASH)
  198. #define IDH_ALERT_IGNORE (IDH_HELPFIRST + ALERT_IGNORE)
  199. // was in spoolids.h
  200. #define IDS_A_BASE 4096
  201. /* also used as button IDs */
  202. #define ID_ABORT 4
  203. #define ID_PAUSE 2
  204. #define ID_RESUME 3
  205. #define ID_EXPLAIN 5
  206. #endif /* _spl_wnt_h_ */