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.

152 lines
3.3 KiB

  1. /*****************************************************************************\
  2. * MODULE: ppprn.h
  3. *
  4. * Prototypes for private funcions in ppprn.c. These functions control the
  5. * printer during the course of a single job.
  6. *
  7. *
  8. * Copyright (C) 1996-1997 Microsoft Corporation
  9. * Copyright (C) 1996-1997 Hewlett Packard
  10. *
  11. * History:
  12. * 07-Oct-1996 HWP-Guys Initiated port from win95 to winNT
  13. *
  14. \*****************************************************************************/
  15. #ifndef _PPPRN_H
  16. #define _PPPRN_H
  17. #define IPO_SIGNATURE 0x5152 // 'RQ' is the signature value
  18. #define IPO_XCV_SIGNATURE 0x5153 // 'SQ' is the signature value
  19. // Mask styles.
  20. //
  21. #define PP_STARTDOC 0x00000001 // To serialize access to the port
  22. #define PP_ENDDOC 0x00000002 // To serialize access to job.
  23. #define PP_FIRSTWRITE 0x00000004 //
  24. #define PP_ZOMBIE 0x00000008 //
  25. #define PP_CANCELLED 0x00000010 //
  26. #define PP_ADDJOB 0x00000020
  27. #if 0
  28. #define PP_LPT 0x00000002 //
  29. #define PP_COM 0x00000004 //
  30. #define PP_FILE 0x00000008 //
  31. #define PP_HARDWARE 0x00000020 //
  32. #define PP_REMOTE 0x00000040 //
  33. #define PP_CURRENT 0x00000080 //
  34. #endif
  35. // hPrinter Structure.
  36. //
  37. typedef struct _INET_HPRINTER {
  38. DWORD dwSignature;
  39. LPTSTR lpszName;
  40. HANDLE hPort;
  41. DWORD dwStatus;
  42. HANDLE hNotify;
  43. #ifdef WINNT32
  44. PCLOGON_USERDATA hUser; // This is used to keep track of the current user logon
  45. #endif
  46. PJOBMAP pjmJob;
  47. } INET_HPRINTER;
  48. typedef INET_HPRINTER *PINET_HPRINTER;
  49. typedef INET_HPRINTER *NPINET_HPRINTER;
  50. typedef INET_HPRINTER *LPINET_HPRINTER;
  51. #ifdef WINNT32
  52. typedef struct _INET_XCV_HPRINTER {
  53. DWORD dwSignature;
  54. LPTSTR lpszName;
  55. } INET_XCV_HPRINTER;
  56. typedef INET_XCV_HPRINTER *PINET_XCV_HPRINTER;
  57. typedef INET_XCV_HPRINTER *NPINET_XCV_HPRINTER;
  58. typedef INET_XCV_HPRINTER *LPINET_XCV_HPRINTER;
  59. typedef struct {
  60. PCINETMONPORT pIniPort;
  61. PJOBMAP pjmJob;
  62. CSid* pSidToken;
  63. } ENDDOCTHREADCONTEXT;
  64. typedef ENDDOCTHREADCONTEXT *PENDDOCTHREADCONTEXT;
  65. #endif
  66. _inline VOID PP_SetStatus(
  67. HANDLE hPrinter,
  68. DWORD dwStatus)
  69. {
  70. ((LPINET_HPRINTER)hPrinter)->dwStatus |= dwStatus;
  71. }
  72. _inline VOID PP_ClrStatus(
  73. HANDLE hPrinter,
  74. DWORD dwStatus)
  75. {
  76. ((LPINET_HPRINTER)hPrinter)->dwStatus &= ~dwStatus;
  77. }
  78. _inline BOOL PP_ChkStatus(
  79. HANDLE hPrinter,
  80. DWORD dwStatus)
  81. {
  82. return (((LPINET_HPRINTER)hPrinter)->dwStatus & dwStatus);
  83. }
  84. _inline PJOBMAP PP_GetJobInfo(
  85. HANDLE hPrinter)
  86. {
  87. return ((LPINET_HPRINTER)hPrinter)->pjmJob;
  88. }
  89. PJOBMAP PP_OpenJobInfo(HANDLE, HANDLE);
  90. VOID PP_CloseJobInfo(HANDLE);
  91. BOOL PPAbortPrinter(
  92. HANDLE hPrinter);
  93. BOOL PPClosePrinter(
  94. HANDLE hPrinter);
  95. BOOL PPEndDocPrinter(
  96. HANDLE hPrinter);
  97. BOOL PPEndPagePrinter(
  98. HANDLE hPrinter);
  99. BOOL PPOpenPrinter(
  100. LPTSTR lpszPrnName,
  101. LPHANDLE phPrinter,
  102. LPPRINTER_DEFAULTS pDefaults);
  103. DWORD PPStartDocPrinter(
  104. HANDLE hPrinter,
  105. DWORD dwLevel,
  106. LPBYTE pDocInfo);
  107. BOOL PPStartPagePrinter(
  108. HANDLE hPrinter);
  109. BOOL PPWritePrinter(
  110. HANDLE hPrinter,
  111. LPVOID lpvBuf,
  112. DWORD cbBuf,
  113. LPDWORD pcbWr);
  114. BOOL PPSetPrinter(
  115. HANDLE hPrinter,
  116. DWORD dwLevel,
  117. LPBYTE pbPrinter,
  118. DWORD dwCmd);
  119. #endif