Leaked source code of windows server 2003
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.

170 lines
5.4 KiB

  1. /*
  2. * Windows/Network Interface
  3. * Copyright (C) Microsoft 1989
  4. *
  5. * Print Manager Administration APIs
  6. * for later inclusion into WINNET.H once they settle down
  7. *
  8. * JONN 4/19/91 Trimmed out unnecessary stuff
  9. * JONN 5/3/91 Added type WNETERR
  10. */
  11. /*
  12. Codes for WNetPrintMgrSelNotify's "type" variable, indicating
  13. what's selected: a queue, a job, or nothing.
  14. */
  15. #define WNPMSEL_NOTHING 0
  16. #define WNPMSEL_QUEUE 1
  17. #define WNPMSEL_JOB 2
  18. #define PRIORITY 10 /* menu uses 10, 11, 12, 13 */
  19. #define ABOUT 24
  20. #define EXIT 25
  21. #define PRINT_LOG 28
  22. #define NETWORK 29
  23. #define HELP_NDEX 30
  24. #define HELP_MOUSE 31
  25. #define HELP_KEYBOARD 32
  26. #define HELP_HELP 33
  27. #define HELP_COMMANDS 34
  28. #define HELP_PROCEDURES 35
  29. #define SHOW_TIME 51
  30. #define SHOW_SIZE 52
  31. #define SHOW_DETAIL 53
  32. #define UPDATE 54
  33. #define SHOW_LOCAL 55
  34. #define SHOW_NET 56
  35. #define SHOW_QUEUE 57
  36. #define SHOW_OTHER 58
  37. #define ALERT_ALWAYS 100
  38. #define ALERT_FLASH 101
  39. #define ALERT_IGNORE 102
  40. #define PM_REFRESH WM_USER + 100 // BUGBUG: Need to define proper manifest
  41. #define PM_SELQUEUE WM_USER + 101
  42. #define PM_QUERYSEL WM_USER + 102
  43. typedef struct _wnpmsel { /* structure returned by PM_QUERYSEL */
  44. WORD wJobID;
  45. char szQueueName [260];
  46. } WNPMSEL, far *LPWNPMSEL;
  47. #define IDM_PROPERTIES 202
  48. #define IDM_CHANGE_MENUS 212
  49. /*
  50. * added JONN 2/26/91
  51. * Print Manager Extensions
  52. */
  53. typedef struct _queuestruct2
  54. {
  55. WORD pq2Name; /* offset to queue name */
  56. WORD pq2Comment; /* offset to queue comment */
  57. WORD pq2Driver; /* offset to driver name */
  58. WORD pq2Status; /* status flags */
  59. WORD pq2Jobcount; /* number of jobs in this queue */
  60. } QUEUESTRUCT2, FAR *LPQS2;
  61. #define QNAME(buf,qs) ((LPSTR)(buf) + (qs).pq2Name)
  62. #define QCOMMENT(buf,qs) ((LPSTR)(buf) + (qs).pq2Comment)
  63. #define QDRIVER(buf,qs) ((LPSTR)(buf) + (qs).pq2Driver)
  64. typedef struct _jobstruct2 {
  65. WORD pj2Id; // job ID
  66. WORD pj2Username; // name of owner (offset to string)
  67. // WORD pj2Parms;
  68. WORD pj2Position; // 0-based position in queue
  69. WORD pj2Status; // status flags (WNPRJ_XXXXX)
  70. DWORD pj2Submitted;
  71. DWORD pj2Size; // size of job in bytes
  72. // WORD pj2Copies;
  73. WORD pj2Comment; // comment/app name (offset to string)
  74. WORD pj2Document; // document name (offset to string)
  75. WORD pj2StatusText; // verbose status (offset to string)
  76. WORD pj2PrinterName; // name of port job is printing on (offs to str)
  77. } JOBSTRUCT2;
  78. typedef JOBSTRUCT2 far * LPJOBSTRUCT2;
  79. #define JOBNAME(buf,job) ((LPSTR)(buf) + (job).pj2Username)
  80. #define JOBCOMMENT(buf,job) ((LPSTR)(buf) + (job).pj2Comment)
  81. #define JOBDOCUMENT(buf,job) ((LPSTR)(buf) + (job).pj2Document)
  82. #define JOBSTATUS(buf,job) ((LPSTR)(buf) + (job).pj2StatusText)
  83. #define JOBPRINTER(buf,job) ((LPSTR)(buf) + (job).pj2PrinterName)
  84. /*
  85. * Type WNETERR distinguishes WN_ error codes from other WORD
  86. * values. Added JONN 5/3/91
  87. */
  88. typedef WORD WNETERR;
  89. // new Print Manager Extensions APIs
  90. extern void far pascal WNetPrintMgrSelNotify (BYTE, LPQS2, LPQS2,
  91. LPJOBSTRUCT2, LPJOBSTRUCT2, LPWORD, LPSTR, WORD);
  92. extern WNETERR far pascal WNetPrintMgrPrinterEnum (LPSTR lpszQueueName,
  93. LPSTR lpBuffer, LPWORD pcbBuffer, LPWORD cAvail, WORD usLevel);
  94. extern WNETERR far pascal WNetPrintMgrChangeMenus(HWND, HANDLE FAR *, BOOL FAR *);
  95. extern WNETERR far pascal WNetPrintMgrCommand (HWND, WORD);
  96. extern void far pascal WNetPrintMgrExiting (void);
  97. extern BOOL far pascal WNetPrintMgrExtHelp (DWORD);
  98. extern void far pascal WNetPrintMgrMoveJob (HWND, LPSTR, WORD, int);
  99. // new values for WNetGetCaps()
  100. #define WNNC_PRINTMGREXT 0x000B
  101. // returns extensions version number, re: GetVersion(),
  102. // or 0 if not supported
  103. // QUEUESTRUCT2.pq2Status and .pq2Jobcount for WNetPrintMgrPrinterEnum[2]
  104. #define WNQ_UNKNOWN -1
  105. #define WNPRS_CANPAUSE 0x0001
  106. #define WNPRS_CANRESUME 0x0002
  107. #define WNPRS_CANDELETE 0x0004
  108. #define WNPRS_CANMOVE 0x0008
  109. // help contexts, were previously in sphelp.h
  110. #define IDH_HELPFIRST 5000
  111. #define IDH_SYSMENU (IDH_HELPFIRST + 2000)
  112. #define IDH_MBFIRST (IDH_HELPFIRST + 2001)
  113. #define IDH_MBLAST (IDH_HELPFIRST + 2099)
  114. #define IDH_DLGFIRST (IDH_HELPFIRST + 3000)
  115. #define IDH_PRIORITY (IDH_HELPFIRST + PRIORITY )
  116. #define IDH_PRIORITY1 (IDH_HELPFIRST + PRIORITY + 1)
  117. #define IDH_PRIORITY2 (IDH_HELPFIRST + PRIORITY + 2)
  118. #define IDH_ABOUT (IDH_HELPFIRST + ABOUT )
  119. #define IDH_EXIT (IDH_HELPFIRST + EXIT)
  120. #define IDH_NETWORK (IDH_HELPFIRST + NETWORK)
  121. #define IDH_HELP_NDEX (IDH_HELPFIRST + HELP_NDEX)
  122. #define IDH_HELP_MOUSE (IDH_HELPFIRST + HELP_MOUSE)
  123. #define IDH_HELP_KEYBOARD (IDH_HELPFIRST + HELP_KEYBOARD)
  124. #define IDH_HELP_HELP (IDH_HELPFIRST + HELP_HELP)
  125. #define IDH_HELP_COMMANDS (IDH_HELPFIRST + HELP_COMMANDS)
  126. #define IDH_HELP_PROCEDURES (IDH_HELPFIRST + HELP_PROCEDURES)
  127. #define IDH_SHOW_TIME (IDH_HELPFIRST + SHOW_TIME)
  128. #define IDH_SHOW_SIZE (IDH_HELPFIRST + SHOW_SIZE)
  129. #define IDH_UPDATE (IDH_HELPFIRST + UPDATE)
  130. #define IDH_SHOW_QUEUE (IDH_HELPFIRST + SHOW_QUEUE)
  131. #define IDH_SHOW_OTHER (IDH_HELPFIRST + SHOW_OTHER)
  132. #define IDH_ALERT_ALWAYS (IDH_HELPFIRST + ALERT_ALWAYS)
  133. #define IDH_ALERT_FLASH (IDH_HELPFIRST + ALERT_FLASH)
  134. #define IDH_ALERT_IGNORE (IDH_HELPFIRST + ALERT_IGNORE)
  135. // was in spoolids.h
  136. #define IDS_A_BASE 4096
  137. /* also used as button IDs */
  138. #define ID_ABORT 4
  139. #define ID_PAUSE 2
  140. #define ID_RESUME 3
  141. #define ID_EXPLAIN 5