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.

137 lines
3.2 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. // hPrinter Structure.
  28. //
  29. typedef struct _INET_HPRINTER {
  30. DWORD dwSignature;
  31. LPTSTR lpszName;
  32. HANDLE hPort;
  33. DWORD dwStatus;
  34. HANDLE hNotify;
  35. PCLOGON_USERDATA hUser; // This is used to keep track of the current user logon
  36. PJOBMAP pjmJob;
  37. } INET_HPRINTER;
  38. typedef INET_HPRINTER *PINET_HPRINTER;
  39. typedef INET_HPRINTER *NPINET_HPRINTER;
  40. typedef INET_HPRINTER *LPINET_HPRINTER;
  41. typedef struct _INET_XCV_HPRINTER {
  42. DWORD dwSignature;
  43. LPTSTR lpszName;
  44. } INET_XCV_HPRINTER;
  45. typedef INET_XCV_HPRINTER *PINET_XCV_HPRINTER;
  46. typedef INET_XCV_HPRINTER *NPINET_XCV_HPRINTER;
  47. typedef INET_XCV_HPRINTER *LPINET_XCV_HPRINTER;
  48. typedef struct {
  49. PCINETMONPORT pIniPort;
  50. PJOBMAP pjmJob;
  51. CSid* pSidToken;
  52. } ENDDOCTHREADCONTEXT;
  53. typedef ENDDOCTHREADCONTEXT *PENDDOCTHREADCONTEXT;
  54. _inline VOID PP_SetStatus(
  55. HANDLE hPrinter,
  56. DWORD dwStatus)
  57. {
  58. ((LPINET_HPRINTER)hPrinter)->dwStatus |= dwStatus;
  59. }
  60. _inline VOID PP_ClrStatus(
  61. HANDLE hPrinter,
  62. DWORD dwStatus)
  63. {
  64. ((LPINET_HPRINTER)hPrinter)->dwStatus &= ~dwStatus;
  65. }
  66. _inline BOOL PP_ChkStatus(
  67. HANDLE hPrinter,
  68. DWORD dwStatus)
  69. {
  70. return (((LPINET_HPRINTER)hPrinter)->dwStatus & dwStatus);
  71. }
  72. _inline PJOBMAP PP_GetJobInfo(
  73. HANDLE hPrinter)
  74. {
  75. return ((LPINET_HPRINTER)hPrinter)->pjmJob;
  76. }
  77. PJOBMAP PP_OpenJobInfo(HANDLE, HANDLE);
  78. VOID PP_CloseJobInfo(HANDLE);
  79. BOOL PPAbortPrinter(
  80. HANDLE hPrinter);
  81. BOOL PPClosePrinter(
  82. HANDLE hPrinter);
  83. BOOL PPEndDocPrinter(
  84. HANDLE hPrinter);
  85. BOOL PPEndPagePrinter(
  86. HANDLE hPrinter);
  87. BOOL PPOpenPrinter(
  88. LPTSTR lpszPrnName,
  89. LPHANDLE phPrinter,
  90. LPPRINTER_DEFAULTS pDefaults);
  91. DWORD PPStartDocPrinter(
  92. HANDLE hPrinter,
  93. DWORD dwLevel,
  94. LPBYTE pDocInfo);
  95. BOOL PPStartPagePrinter(
  96. HANDLE hPrinter);
  97. BOOL PPWritePrinter(
  98. HANDLE hPrinter,
  99. LPVOID lpvBuf,
  100. DWORD cbBuf,
  101. LPDWORD pcbWr);
  102. BOOL PPSetPrinter(
  103. HANDLE hPrinter,
  104. DWORD dwLevel,
  105. LPBYTE pbPrinter,
  106. DWORD dwCmd);
  107. #endif