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.

159 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1990-1994 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. Client.h
  6. Abstract:
  7. Holds Client Spooler types and prototypes
  8. Author:
  9. Environment:
  10. User Mode -Win32
  11. Revision History:
  12. Steve Wilson (NT) (swilson) 1-Jun-95 Ported from spoolss\client\client.h
  13. --*/
  14. typedef int (FAR WINAPI *INT_FARPROC)();
  15. typedef struct _GENERIC_CONTAINER {
  16. DWORD Level;
  17. LPBYTE pData;
  18. } GENERIC_CONTAINER, *PGENERIC_CONTAINER, *LPGENERIC_CONTAINER ;
  19. typedef struct _SPOOL *PSPOOL;
  20. typedef struct _NOTIFY *PNOTIFY;
  21. typedef struct _NOTIFY {
  22. PNOTIFY pNext;
  23. HANDLE hEvent; // event to trigger on notification
  24. DWORD fdwFlags; // flags to watch for
  25. DWORD fdwOptions; // PRINTER_NOTIFY_*
  26. DWORD dwReturn; // used by WPC when simulating FFPCN
  27. PSPOOL pSpool;
  28. } NOTIFY;
  29. typedef struct _SPOOL {
  30. DWORD signature;
  31. HANDLE hPrinter;
  32. DWORD Status;
  33. LONG cThreads; // InterlockedDecrement/Increment variable for thread synch
  34. HANDLE hModule; // Driver UM DLL Module Handle
  35. DWORD (*pfnWrite)();
  36. HANDLE (*pfnStartDoc)();
  37. VOID (*pfnEndDoc)();
  38. VOID (*pfnClose)();
  39. BOOL (*pfnStartPage)();
  40. BOOL (*pfnEndPage)();
  41. VOID (*pfnAbort)();
  42. HANDLE hDriver; // supplied to us by driver UI dll
  43. DWORD JobId;
  44. } SPOOL;
  45. //
  46. // Change the RPC buffer size to 64K
  47. //
  48. #define BUFFER_SIZE 0x10000
  49. #define SP_SIGNATURE 0x6767
  50. #define SPOOL_STATUS_STARTDOC 0x00000001
  51. #define SPOOL_STATUS_ADDJOB 0x00000002
  52. #define SPOOL_STATUS_ANSI 0x00000004
  53. #define SPOOL_FLAG_FFPCN_FAILED 0x1
  54. #define SPOOL_FLAG_LAZY_CLOSE 0x2
  55. DWORD
  56. TranslateExceptionCode(
  57. DWORD ExceptionCode
  58. );
  59. PNOTIFY
  60. WPCWaitFind(
  61. HANDLE hFind);
  62. BOOL
  63. ValidatePrinterHandle(
  64. HANDLE hPrinter
  65. );
  66. VOID
  67. FreeSpool(
  68. PSPOOL pSpool);
  69. LPVOID
  70. DllAllocSplMem(
  71. DWORD cb
  72. );
  73. BOOL
  74. DllFreeSplMem(
  75. LPVOID pMem
  76. );
  77. BOOL
  78. FlushBuffer(
  79. PSPOOL pSpool
  80. );
  81. PSECURITY_DESCRIPTOR
  82. BuildInputSD(
  83. PSECURITY_DESCRIPTOR pPrinterSD,
  84. PDWORD pSizeSD
  85. );
  86. typedef struct _KEYDATA {
  87. DWORD cb;
  88. DWORD cTokens;
  89. LPWSTR pTokens[1];
  90. } KEYDATA, *PKEYDATA;
  91. PKEYDATA
  92. CreateTokenList(
  93. LPWSTR pKeyData
  94. );
  95. LPWSTR
  96. GetPrinterPortList(
  97. HANDLE hPrinter
  98. );
  99. LPWSTR
  100. FreeUnicodeString(
  101. LPWSTR pUnicodeString
  102. );
  103. LPWSTR
  104. AllocateUnicodeString(
  105. LPSTR pPrinterName
  106. );
  107. LPWSTR
  108. StartDocDlgW(
  109. HANDLE hPrinter,
  110. DOCINFO *pDocInfo
  111. );
  112. LPSTR
  113. StartDocDlgA(
  114. HANDLE hPrinter,
  115. DOCINFOA *pDocInfo
  116. );