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.

237 lines
4.0 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. LPTSTR
  134. pszGetPrinterName(
  135. PINIPRINTER pIniPrinter,
  136. BOOL bFull,
  137. LPCTSTR pszToken OPTIONAL
  138. );
  139. BOOL
  140. CreateDlName(
  141. IN LPCWSTR pszName,
  142. IN PINIMONITOR pIniMonitor,
  143. IN OUT PWSTR pszNameNew,
  144. IN SIZE_T cchNameNew
  145. );
  146. PINIMONITOR
  147. InitializeDMonitor(
  148. PINIMONITOR pIniMonitor,
  149. LPWSTR pszRegistryRoot
  150. );
  151. VOID
  152. InitializeUMonitor(
  153. PINIMONITOR pIniMonitor
  154. );
  155. //
  156. // Clustering support.
  157. //
  158. BOOL
  159. SplClusterSplOpen(
  160. LPCTSTR pszServer,
  161. LPCTSTR pszResource,
  162. PHANDLE phSpooler,
  163. LPCTSTR pszName,
  164. LPCTSTR pszAddress
  165. );
  166. BOOL
  167. SplClusterSplClose(
  168. HANDLE hSpooler
  169. );
  170. BOOL
  171. SplClusterSplIsAlive(
  172. HANDLE hSpooler
  173. );
  174. DWORD
  175. ClusterGetResourceDriveLetter(
  176. IN LPCWSTR pszResource,
  177. OUT LPWSTR *ppszClusResDriveLetter
  178. );
  179. DWORD
  180. ClusterGetResourceID(
  181. IN LPCWSTR pszResource,
  182. OUT LPWSTR *ppszClusResID
  183. );
  184. #ifdef __cplusplus
  185. }
  186. #endif
  187. #endif // ifdef _CLUSTER_H