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.

242 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. clusspl.c
  5. Abstract:
  6. Cluster code support.
  7. Author:
  8. Albert Ting (AlbertT) 6-Oct-96
  9. Revision History:
  10. --*/
  11. #ifndef _CLUSTER_H
  12. #define _CLUSTER_H
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. typedef struct _CLUSTER {
  17. DWORD signature;
  18. HANDLE hSpooler;
  19. } CLUSTER, *PCLUSTER;
  20. #define CLS_SIGNATURE 0x636c73 // CLS
  21. BOOL
  22. ShutdownSpooler(
  23. HANDLE hSpooler
  24. );
  25. VOID
  26. ShutdownMonitors(
  27. PINISPOOLER pIniSpooler
  28. );
  29. BOOL
  30. InitializeShared(
  31. PINISPOOLER pIniSpooler
  32. );
  33. VOID
  34. DeleteShared(
  35. PINISPOOLER pIniSpooler
  36. );
  37. /********************************************************************
  38. Cluster registry access.
  39. ********************************************************************/
  40. HKEY
  41. OpenClusterParameterKey(
  42. IN LPCTSTR pszResource
  43. );
  44. LONG
  45. SplRegCreateKey(
  46. IN HKEY hKey,
  47. IN LPCTSTR pszSubKey,
  48. IN DWORD dwOptions,
  49. IN REGSAM samDesired,
  50. IN PSECURITY_ATTRIBUTES pSecurityAttirbutes,
  51. OUT PHKEY phkResult,
  52. OUT PDWORD pdwDisposition,
  53. IN PINISPOOLER pIniSpooler
  54. );
  55. LONG
  56. SplRegOpenKey(
  57. IN HKEY hKey,
  58. IN LPCTSTR pszSubKey,
  59. IN REGSAM samDesired,
  60. OUT PHKEY phkResult,
  61. IN PINISPOOLER pIniSpooler
  62. );
  63. LONG
  64. SplRegCloseKey(
  65. IN HKEY hKey,
  66. IN PINISPOOLER pIniSpooler
  67. );
  68. LONG
  69. SplRegDeleteKey(
  70. IN HKEY hKey,
  71. IN LPCTSTR pszSubKey,
  72. IN PINISPOOLER pIniSpooler
  73. );
  74. LONG
  75. SplRegEnumKey(
  76. IN HKEY hKey,
  77. IN DWORD dwIndex,
  78. OUT LPTSTR pszName,
  79. IN OUT PDWORD pcchName,
  80. OUT PFILETIME pftLastWriteTime,
  81. IN PINISPOOLER pIniSpooler
  82. );
  83. LONG
  84. SplRegQueryInfoKey(
  85. HKEY hKey,
  86. PDWORD pcSubKeys, OPTIONAL
  87. PDWORD pcbKey, OPTIONAL
  88. PDWORD pcValues, OPTIONAL
  89. PDWORD pcbValue, OPTIONAL
  90. PDWORD pcbData, OPTIONAL
  91. PDWORD pcbSecurityDescriptor, OPTIONAL
  92. PFILETIME pftLastWriteTime, OPTIONAL
  93. PINISPOOLER pIniSpooler
  94. );
  95. LONG
  96. SplRegSetValue(
  97. IN HKEY hKey,
  98. IN LPCTSTR pszValue,
  99. IN DWORD dwType,
  100. IN const BYTE* pData,
  101. IN DWORD cbData,
  102. IN PINISPOOLER pIniSpooler
  103. );
  104. LONG
  105. SplRegDeleteValue(
  106. IN HKEY hKey,
  107. IN LPCTSTR pszValue,
  108. IN PINISPOOLER pIniSpooler
  109. );
  110. LONG
  111. SplRegEnumValue(
  112. IN HKEY hKey,
  113. IN DWORD dwIndex,
  114. OUT LPTSTR pszValue,
  115. IN OUT PDWORD pcbValue,
  116. OUT PDWORD pType, OPTIONAL
  117. OUT PBYTE pData,
  118. IN OUT PDWORD pcbData,
  119. IN PINISPOOLER pIniSpooler
  120. );
  121. LONG
  122. SplRegQueryValue(
  123. IN HKEY hKey,
  124. IN LPCTSTR pszValue,
  125. OUT PDWORD pType, OPTIONAL
  126. OUT PBYTE pData,
  127. IN OUT PDWORD pcbData,
  128. IN PINISPOOLER pIniSpooler
  129. );
  130. /********************************************************************
  131. Misc changes
  132. ********************************************************************/
  133. VOID
  134. BuildOtherNamesFromSpoolerInfo2(
  135. PSPOOLER_INFO_2 pSpoolerInfo2,
  136. PINISPOOLER pIniSpooler
  137. );
  138. LPTSTR
  139. pszGetPrinterName(
  140. PINIPRINTER pIniPrinter,
  141. BOOL bFull,
  142. LPCTSTR pszToken OPTIONAL
  143. );
  144. BOOL
  145. CreateDlName(
  146. IN LPCWSTR pszName,
  147. IN PINIMONITOR pIniMonitor,
  148. OUT LPCWSTR pszNameNew
  149. );
  150. PINIMONITOR
  151. InitializeDMonitor(
  152. PINIMONITOR pIniMonitor,
  153. LPWSTR pszRegistryRoot
  154. );
  155. VOID
  156. InitializeUMonitor(
  157. PINIMONITOR pIniMonitor
  158. );
  159. //
  160. // Clustering support.
  161. //
  162. BOOL
  163. SplClusterSplOpen(
  164. LPCTSTR pszServer,
  165. LPCTSTR pszResource,
  166. PHANDLE phSpooler,
  167. LPCTSTR pszName,
  168. LPCTSTR pszAddress
  169. );
  170. BOOL
  171. SplClusterSplClose(
  172. HANDLE hSpooler
  173. );
  174. BOOL
  175. SplClusterSplIsAlive(
  176. HANDLE hSpooler
  177. );
  178. DWORD
  179. ClusterGetResourceDriveLetter(
  180. IN LPCWSTR pszResource,
  181. OUT LPWSTR *ppszClusResDriveLetter
  182. );
  183. DWORD
  184. ClusterGetResourceID(
  185. IN LPCWSTR pszResource,
  186. OUT LPWSTR *ppszClusResID
  187. );
  188. #ifdef __cplusplus
  189. }
  190. #endif
  191. #endif // ifdef _CLUSTER_H