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.

154 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1992-1993 Microsoft Corporation
  3. Module Name:
  4. DosPrtP.h
  5. Abstract:
  6. This contains macros and prototypes private to the DosPrint APIs.
  7. Author:
  8. John Rogers (JohnRo) 02-Oct-1992
  9. Environment:
  10. Notes:
  11. All of the RxPrint APIs are wide-character APIs, regardless of
  12. whether or not UNICODE is defined. This allows the net/dosprint/dosprint.c
  13. code to use the winspool APIs (which are currently ANSI APIs, despite their
  14. prototypes using LPTSTR in some places).
  15. Revision History:
  16. 02-Oct-1992 JohnRo
  17. Created for RAID 3556: DosPrintQGetInfo (from downlevel) level=3 rc=124.
  18. 22-Mar-1993 JohnRo
  19. RAID 2974: NET PRINT says NT printer is held when it isn't.
  20. DosPrint API cleanup.
  21. Made changes suggested by PC-LINT 5.0
  22. Added some IN and OUT keywords.
  23. 07-Apr-1993 JohnRo
  24. RAID 5670: "NET PRINT \\server\share" gives err 124 (bad level) on NT.
  25. Also quiet normal debug output.
  26. --*/
  27. #ifndef _DOSPRTP_
  28. #define _DOSPRTP_
  29. #ifndef PREFIX_DOSPRINT
  30. #define PREFIX_DOSPRINT PREFIX_NETLIB
  31. #endif
  32. // In DosPrtP.c, Unicode version:
  33. NET_API_STATUS
  34. CommandALocalPrinterW(
  35. IN LPWSTR PrinterName,
  36. IN DWORD Command // PRINTER_CONTROL_PAUSE, etc.
  37. );
  38. // In DosPrtP.c, Ansi version:
  39. NET_API_STATUS
  40. CommandALocalJobA(
  41. IN HANDLE PrinterHandle, OPTIONAL
  42. IN LPWSTR LocalServerNameW,
  43. IN LPSTR LocalServerNameA,
  44. IN DWORD JobId,
  45. IN DWORD Level,
  46. IN LPBYTE pJob,
  47. IN DWORD Command // JOB_CONTROL_PAUSE, etc.
  48. );
  49. // In DosPrtP.c:
  50. // Note: FindLocalJob() calls SetLastError() to indicate the cause of an error.
  51. HANDLE
  52. FindLocalJob(
  53. IN DWORD JobId
  54. );
  55. // In DosPrtP.c:
  56. LPSTR
  57. FindQueueNameInPrinterNameA(
  58. IN LPCSTR PrinterName
  59. );
  60. // In DosPrtP.c:
  61. LPWSTR
  62. FindQueueNameInPrinterNameW(
  63. IN LPCWSTR PrinterName
  64. );
  65. // BOOL
  66. // NetpIsPrintDestLevelValid(
  67. // IN DWORD Level, // Info level
  68. // IN BOOL SetInfo // Are setinfo levels allowed?
  69. // );
  70. //
  71. #define NetpIsPrintDestLevelValid(Level,SetInfo) \
  72. /*lint -save -e506 */ /* don't complain about constant values here */ \
  73. ( ( (SetInfo) && ((Level)==3) ) \
  74. || ( (Level) <= 3 ) ) \
  75. /*lint -restore */
  76. // BOOL
  77. // NetpIsPrintJobLevelValid(
  78. // IN DWORD Level, // Info level
  79. // IN BOOL SetInfo // Are setinfo levels allowed?
  80. // );
  81. //
  82. #define NetpIsPrintJobLevelValid(Level,SetInfo) \
  83. /*lint -save -e506 */ /* don't complain about constant values here */ \
  84. ( ( (SetInfo) && (((Level)==1) || ((Level)==3)) ) \
  85. || ( (Level) <= 3 ) ) \
  86. /*lint -restore */
  87. // BOOL
  88. // NetpIsPrintQLevelValid(
  89. // IN DWORD Level, // Info level
  90. // IN BOOL SetInfo // Are setinfo levels allowed?
  91. // );
  92. //
  93. #define NetpIsPrintQLevelValid(Level,SetInfo) \
  94. /*lint -save -e506 */ /* don't complain about constant values here */ \
  95. ( ( (SetInfo) && (((Level)==1) || ((Level)==3)) ) \
  96. || ( (Level) <= 5 ) || ( (Level) == 52 ) ) \
  97. /*lint -restore */
  98. // In DosPrtP.c:
  99. DWORD
  100. NetpJobCountForQueue(
  101. IN DWORD QueueLevel,
  102. IN LPVOID Queue,
  103. IN BOOL HasUnicodeStrings
  104. );
  105. // In DosPrtP.c:
  106. WORD
  107. PrjStatusFromJobStatus(
  108. IN DWORD JobStatus
  109. );
  110. // In DosPrtP.c:
  111. WORD
  112. PrqStatusFromPrinterStatus(
  113. IN DWORD PrinterStatus
  114. );
  115. #endif // _DOSPRTP_