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.

164 lines
2.9 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. #ifndef _SPOOLER_SERVER_CLIENT_H_
  15. #define _SPOOLER_SERVER_CLIENT_H_
  16. typedef int (FAR WINAPI *INT_FARPROC)();
  17. typedef struct _GENERIC_CONTAINER {
  18. DWORD Level;
  19. LPBYTE pData;
  20. } GENERIC_CONTAINER, *PGENERIC_CONTAINER, *LPGENERIC_CONTAINER ;
  21. typedef struct _SPOOL *PSPOOL;
  22. typedef struct _NOTIFY *PNOTIFY;
  23. typedef struct _NOTIFY {
  24. PNOTIFY pNext;
  25. HANDLE hEvent; // event to trigger on notification
  26. DWORD fdwFlags; // flags to watch for
  27. DWORD fdwOptions; // PRINTER_NOTIFY_*
  28. DWORD dwReturn; // used by WPC when simulating FFPCN
  29. PSPOOL pSpool;
  30. } NOTIFY;
  31. typedef struct _SPOOL {
  32. DWORD signature;
  33. HANDLE hPrinter;
  34. DWORD Status;
  35. LONG cThreads; // InterlockedDecrement/Increment variable for thread synch
  36. HANDLE hModule; // Driver UM DLL Module Handle
  37. DWORD (*pfnWrite)();
  38. HANDLE (*pfnStartDoc)();
  39. VOID (*pfnEndDoc)();
  40. VOID (*pfnClose)();
  41. BOOL (*pfnStartPage)();
  42. BOOL (*pfnEndPage)();
  43. VOID (*pfnAbort)();
  44. HANDLE hDriver; // supplied to us by driver UI dll
  45. DWORD JobId;
  46. } SPOOL;
  47. //
  48. // Change the RPC buffer size to 64K
  49. //
  50. #define BUFFER_SIZE 0x10000
  51. #define SP_SIGNATURE 0x6767
  52. #define SPOOL_STATUS_STARTDOC 0x00000001
  53. #define SPOOL_STATUS_ADDJOB 0x00000002
  54. #define SPOOL_STATUS_ANSI 0x00000004
  55. #define SPOOL_FLAG_FFPCN_FAILED 0x1
  56. #define SPOOL_FLAG_LAZY_CLOSE 0x2
  57. DWORD
  58. TranslateExceptionCode(
  59. DWORD ExceptionCode
  60. );
  61. PNOTIFY
  62. WPCWaitFind(
  63. HANDLE hFind);
  64. BOOL
  65. ValidatePrinterHandle(
  66. HANDLE hPrinter
  67. );
  68. VOID
  69. FreeSpool(
  70. PSPOOL pSpool);
  71. LPVOID
  72. DllAllocSplMem(
  73. DWORD cb
  74. );
  75. BOOL
  76. DllFreeSplMem(
  77. LPVOID pMem
  78. );
  79. BOOL
  80. FlushBuffer(
  81. PSPOOL pSpool
  82. );
  83. PSECURITY_DESCRIPTOR
  84. BuildInputSD(
  85. PSECURITY_DESCRIPTOR pPrinterSD,
  86. PDWORD pSizeSD
  87. );
  88. typedef struct _KEYDATA {
  89. DWORD cb;
  90. DWORD cTokens;
  91. LPWSTR pTokens[1];
  92. } KEYDATA, *PKEYDATA;
  93. PKEYDATA
  94. CreateTokenList(
  95. LPWSTR pKeyData
  96. );
  97. LPWSTR
  98. GetPrinterPortList(
  99. HANDLE hPrinter
  100. );
  101. LPWSTR
  102. FreeUnicodeString(
  103. LPWSTR pUnicodeString
  104. );
  105. LPWSTR
  106. AllocateUnicodeString(
  107. LPSTR pPrinterName
  108. );
  109. LPWSTR
  110. StartDocDlgW(
  111. HANDLE hPrinter,
  112. DOCINFO *pDocInfo
  113. );
  114. LPSTR
  115. StartDocDlgA(
  116. HANDLE hPrinter,
  117. DOCINFOA *pDocInfo
  118. );
  119. #endif // _SPOOLER_SERVER_CLIENT_H_