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.

208 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1990 - 1995 Microsoft Corporation
  3. Module Name:
  4. local.h
  5. Abstract:
  6. Header file for Local Print Providor
  7. Author:
  8. Dave Snipp (DaveSn) 15-Mar-1991
  9. Revision History:
  10. Matt Feton (MattFe) Jan 17 1995 add separate heaps
  11. --*/
  12. #define ONEDAY 60*24
  13. // Timeout to start spooler's phase 2 initialization in milliseconds
  14. #define SPOOLER_START_PHASE_TWO_INIT 2*60*1000
  15. #define offsetof(type, identifier) (DWORD)(&(((type*)0)->identifier))
  16. extern char *szDriverIni;
  17. extern char *szDriverFileEntry;
  18. extern char *szDriverDataFile;
  19. extern char *szDriverConfigFile;
  20. extern char *szDriverDir;
  21. extern char *szPrintProcDir;
  22. extern char *szPrinterDir;
  23. extern char *szPrinterIni;
  24. extern char *szAllShadows;
  25. extern char *szNullPort;
  26. extern char *szComma;
  27. extern HANDLE hHeap;
  28. extern HANDLE HeapSemaphore;
  29. extern HANDLE InitSemaphore;
  30. extern BOOL Initialized;
  31. extern CRITICAL_SECTION SpoolerSection;
  32. extern DWORD gbFailAllocs;
  33. BOOL
  34. LocalInitialize(
  35. VOID
  36. );
  37. VOID
  38. EnterSplSem(
  39. VOID
  40. );
  41. VOID
  42. LeaveSplSem(
  43. VOID
  44. );
  45. LPVOID
  46. DllAllocSplMem(
  47. DWORD cb
  48. );
  49. BOOL
  50. DllFreeSplMem(
  51. LPVOID pMem
  52. );
  53. LPVOID
  54. DllReallocSplMem(
  55. LPVOID lpOldMem,
  56. DWORD cbOld,
  57. DWORD cbNew
  58. );
  59. BOOL
  60. DllFreeSplStr(
  61. LPWSTR lpStr
  62. );
  63. BOOL
  64. ValidateReadPointer(
  65. PVOID pPoint,
  66. ULONG Len
  67. );
  68. BOOL
  69. ValidateWritePointer(
  70. PVOID pPoint,
  71. ULONG Len
  72. );
  73. BOOL
  74. DeleteSubKeyTree(
  75. HKEY ParentHandle,
  76. WCHAR SubKeyName[]
  77. );
  78. LPWSTR
  79. AppendOrderEntry(
  80. LPWSTR szOrderString,
  81. DWORD cbStringSize,
  82. LPWSTR szOrderEntry,
  83. LPDWORD pcbBytesReturned
  84. );
  85. LPWSTR
  86. RemoveOrderEntry(
  87. LPWSTR szOrderString,
  88. DWORD cbStringSize,
  89. LPWSTR szOrderEntry,
  90. LPDWORD pcbBytesReturned
  91. );
  92. LPPROVIDOR
  93. InitializeProvidor(
  94. LPWSTR pProvidorName,
  95. LPWSTR pFullName
  96. );
  97. VOID
  98. WaitForSpoolerInitialization(
  99. VOID
  100. );
  101. HKEY
  102. GetClientUserHandle(
  103. IN REGSAM samDesired
  104. );
  105. BOOL
  106. MyUNCName(
  107. LPWSTR pNameStart
  108. );
  109. BOOL
  110. BuildOtherNamesFromMachineName(
  111. LPWSTR **ppszMyOtherNames,
  112. DWORD *cOtherNames
  113. );
  114. BOOL
  115. bCompatibleDevMode(
  116. PPRINTHANDLE pPrintHandle,
  117. PDEVMODE pDevModeBase,
  118. PDEVMODE pDevModeNew
  119. );
  120. LPWSTR
  121. FormatPrinterForRegistryKey(
  122. LPCWSTR pSource, /* The string from which backslashes are to be removed. */
  123. LPWSTR pScratch /* Scratch buffer for the function to write in; */
  124. ); /* must be at least as long as pSource. */
  125. LPWSTR
  126. FormatRegistryKeyForPrinter(
  127. LPWSTR pSource, /* The string from which backslashes are to be added. */
  128. LPWSTR pScratch /* Scratch buffer for the function to write in; */
  129. ); /* must be at least as long as pSource. */
  130. PWSTR
  131. AutoCat(
  132. PCWSTR pszInput,
  133. PCWSTR pszCat
  134. );
  135. BOOL
  136. bGetDevModePerUserEvenForShares(
  137. IN HKEY hKeyUser, OPTIONAL
  138. IN LPCWSTR pszPrinter,
  139. OUT PDEVMODE *ppDevMode
  140. );
  141. DWORD
  142. GetAPDPolicy(
  143. IN HKEY hKey,
  144. IN LPCWSTR pszRelPath,
  145. IN LPCWSTR pszValueName,
  146. IN LPDWORD pValue
  147. );
  148. DWORD
  149. SetAPDPolicy(
  150. IN HKEY hKey,
  151. IN LPCWSTR pszRelPath,
  152. IN LPCWSTR pszValueName,
  153. IN DWORD Value
  154. );
  155. DWORD
  156. IsValidDevmode(
  157. IN PDEVMODE pDevmode,
  158. IN size_t DevmodeSize
  159. );