source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/resapi.h

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 41.6 KB
RevLine 
[1166]1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#include <winapifamily.h>
7
8#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
9
10#ifndef _RESAPI_DEFINES_
11#define _RESAPI_DEFINES_
12
13#include <windows.h>
14#include <winsvc.h>
15#include <clusapi.h>
16#include <stdio.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#ifndef _NO_W32_PSEUDO_MODIFIERS
23#ifndef IN
24#define IN
25#endif
26#ifndef OUT
27#define OUT
28#endif
29#ifndef OPTIONAL
30#define OPTIONAL
31#endif
32#endif
33
34#define STARTUP_ROUTINE "Startup"
35
36#define CLRES_V1_FUNCTION_SIZE sizeof(CLRES_V1_FUNCTIONS)
37#define CLRES_VERSION_V1_00 0x100
38
39#define CLRES_V1_FUNCTION_TABLE(_Name, _Version, _Prefix, _Arbitrate, _Release, _ResControl, _ResTypeControl) CLRES_FUNCTION_TABLE _Name = { CLRES_V1_FUNCTION_SIZE, _Version, _Prefix##Open, _Prefix##Close, _Prefix##Online, _Prefix##Offline, _Prefix##Terminate, _Prefix##LooksAlive, _Prefix##IsAlive, _Arbitrate, _Release, _ResControl, _ResTypeControl }
40
41#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
42#define STARTUP_EX_ROUTINE "StartupEx"
43
44#define CLRES_V2_FUNCTION_SIZE sizeof (CLRES_V2_FUNCTIONS)
45#define CLRES_VERSION_V2_00 0x200
46#define CLRES_V2_FUNCTION_TABLE_SET(_Name, _Version, _Prefix, _Arbitrate, _Release, _ResControl, _ResTypeControl, _LooksAlive, _IsAlive, _Cancel) _Name.TableSize = CLRES_V2_FUNCTION_SIZE; _Name.Version = _Version; _Name.V2Functions.Open = _Prefix##OpenV2; _Name.V2Functions.Close = _Prefix##Close; _Name.V2Functions.Online = _Prefix##OnlineV2; _Name.V2Functions.Offline = _Prefix##OfflineV2; _Name.V2Functions.Terminate = _Prefix##Terminate; _Name.V2Functions.LooksAlive= _LooksAlive; _Name.V2Functions.IsAlive = _IsAlive; _Name.V2Functions.Arbitrate = _Arbitrate; _Name.V2Functions.Release = _Release; _Name.V2Functions.ResourceControl = _ResControl; _Name.V2Functions.ResourceTypeControl = _ResTypeControl; _Name.V2Functions.Cancel = _Cancel;
47#endif
48#endif
49
50#ifndef _RESAPI_
51#define _RESAPI_
52
53#ifndef FIELD_OFFSET
54#define FIELD_OFFSET(type, field) ((LONG) __builtin_offsetof(Type, Field))
55#endif
56
57#define ClusterResourceCannotComeOnlineOnThisNode (CLUSTER_RESOURCE_STATE) (ClusterResourcePending - 1)
58#define ClusterResourceCannotComeOnlineOnAnyNode (CLUSTER_RESOURCE_STATE) (ClusterResourcePending - 2)
59
60#define ResUtilInitializeResourceStatus(_resource_status_) ZeroMemory (_resource_status_, sizeof (RESOURCE_STATUS))
61
62#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
63#define CLUSCTL_GET_OPERATION_CONTEXT_PARAMS_VERSION_1 1
64
65#define CLUSRES_GET_OPERATION_CONTEXT_FLAGS { CLUSRES_NAME_GET_OPERATION_CONTEXT_FLAGS, NULL, CLUSPROP_FORMAT_DWORD, 0, 0, 0xffffffff, RESUTIL_PROPITEM_REQUIRED, 0 }
66#define CLUSRES_NAME_GET_OPERATION_CONTEXT_FLAGS L"Flags"
67
68#define RESOURCE_SPECIFIC_STATUS_PROP_ITEM { CLUSREG_NAME_RES_STATUS, NULL, CLUSPROP_FORMAT_SZ, 0, 0, 0, RESUTIL_PROPITEM_IN_MEMORY, 0 }
69#define RESOURCE_SPECIFIC_DATA1_PROP_ITEM { CLUSREG_NAME_RES_DATA1, NULL, CLUSPROP_FORMAT_ULARGE_INTEGER, 0, 0, 0, RESUTIL_PROPITEM_READ_ONLY | RESUTIL_PROPITEM_IN_MEMORY, 0 }
70#define RESOURCE_SPECIFIC_DATA2_PROP_ITEM { CLUSREG_NAME_RES_DATA2, NULL, CLUSPROP_FORMAT_ULARGE_INTEGER, 0, 0, 0, RESUTIL_PROPITEM_READ_ONLY | RESUTIL_PROPITEM_IN_MEMORY, 0 }
71
72#define CLUSRESDLL_STATUS_OFFLINE_BUSY 0x00000001
73#define CLUSRESDLL_STATUS_OFFLINE_SOURCE_THROTTLED 0x00000002
74#define CLUSRESDLL_STATUS_OFFLINE_DESTINATION_THROTTLED 0x00000004
75#define CLUSRESDLL_STATUS_OFFLINE_DESTINATION_REJECTED 0x00000008
76#define CLUSRESDLL_STATUS_INSUFFICIENT_MEMORY 0x00000010
77#define CLUSRESDLL_STATUS_INSUFFICIENT_PROCESSOR 0x00000020
78#define CLUSRESDLL_STATUS_INSUFFICIENT_OTHER_RESOURCES 0x00000040
79#define CLUSRESDLL_STATUS_INVALID_PARAMETERS 0x00000080
80
81#define ResUtilInitializeResourceStatusEx(_resource_status_) ZeroMemory (_resource_status_, sizeof (RESOURCE_STATUS_EX))
82
83#define CLUS_RESDLL_OPEN_RECOVER_MONITOR_STATE 0x00000001
84#define CLUS_RESDLL_ONLINE_RECOVER_MONITOR_STATE 0x00000001
85#define CLUS_RESDLL_ONLINE_IGNORE_RESOURCE_STATUS 0x00000002
86#define CLUS_RESDLL_ONLINE_RETURN_TO_SOURCE_NODE_ON_ERROR 0x00000004
87#define CLUS_RESDLL_ONLINE_RESTORE_ONLINE_STATE 0x00000008
88
89#define CLUS_RESDLL_OFFLINE_IGNORE_RESOURCE_STATUS 0x00000001
90#define CLUS_RESDLL_OFFLINE_RETURN_TO_SOURCE_NODE_ON_ERROR 0x00000002
91#define CLUS_RESDLL_OFFLINE_QUEUE_ENABLED 0x00000004
92#define CLUS_RESDLL_OFFLINE_RETURNING_TO_SOURCE_NODE_BECAUSE_OF_ERROR 0x00000008
93#define CLUS_RESDLL_OFFLINE_DUE_TO_EMBEDDED_FAILURE 0x00000010
94#endif
95
96#define RESUTIL_PROPITEM_READ_ONLY 0x00000001
97#define RESUTIL_PROPITEM_REQUIRED 0x00000002
98#define RESUTIL_PROPITEM_SIGNED 0x00000004
99#define RESUTIL_PROPITEM_IN_MEMORY 0x00000008
100
101 typedef enum LOG_LEVEL {
102 LOG_INFORMATION,
103 LOG_WARNING,
104 LOG_ERROR,
105 LOG_SEVERE
106 } LOG_LEVEL,*PLOG_LEVEL;
107
108 typedef enum _RESOURCE_EXIT_STATE {
109 ResourceExitStateContinue,
110 ResourceExitStateTerminate,
111 ResourceExitStateMax
112 } RESOURCE_EXIT_STATE;
113
114 typedef enum _CLUSTER_ROLE {
115 ClusterRoleDHCP,
116 ClusterRoleDTC,
117 ClusterRoleFileServer,
118 ClusterRoleGenericApplication,
119 ClusterRoleGenericScript,
120 ClusterRoleGenericService,
121 ClusterRoleISCSINameServer,
122 ClusterRoleMSMQ,
123 ClusterRoleNFS,
124 ClusterRolePrintServer,
125 ClusterRoleStandAloneNamespaceServer,
126 ClusterRoleVolumeShadowCopyServiceTask,
127 ClusterRoleWINS,
128 ClusterRoleTaskScheduler,
129 ClusterRoleNetworkFileSystem,
130 ClusterRoleDFSReplicatedFolder,
131 ClusterRoleDistributedFileSystem,
132 ClusterRoleDistributedNetworkName,
133 ClusterRoleFileShare,
134 ClusterRoleFileShareWitness,
135 ClusterRoleHardDisk,
136 ClusterRoleIPAddress,
137 ClusterRoleIPV6Address,
138 ClusterRoleIPV6TunnelAddress,
139 ClusterRoleISCSITargetServer,
140 ClusterRoleNetworkName,
141 ClusterRolePhysicalDisk,
142 ClusterRoleSODAFileServer,
143 ClusterRoleStoragePool,
144 ClusterRoleVirtualMachine,
145 ClusterRoleVirtualMachineConfiguration,
146 ClusterRoleVirtualMachineReplicaBroker
147 } CLUSTER_ROLE;
148
149 typedef enum _CLUSTER_ROLE_STATE {
150 ClusterRoleUnknown = -1,
151 ClusterRoleClustered,
152 ClusterRoleUnclustered
153 } CLUSTER_ROLE_STATE;
154
155#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
156 typedef enum VM_RESDLL_CONTEXT {
157 VmResdllContextTurnOff = 0,
158 VmResdllContextSave = 1,
159 VmResdllContextShutdown = 2,
160 VmResdllContextShutdownForce = 3,
161 VmResdllContextLiveMigration = 4
162 } VM_RESDLL_CONTEXT,*PVM_RESDLL_CONTEXT;
163
164 typedef enum RESDLL_CONTEXT_OPERATION_TYPE {
165 ResdllContextOperationTypeFailback,
166 ResdllContextOperationTypeDrain,
167 ResdllContextOperationTypeDrainFailure,
168 ResdllContextOperationTypeEmbeddedFailure,
169 ResdllContextOperationTypePreemption
170 } RESDLL_CONTEXT_OPERATION_TYPE,*PRESDLL_CONTEXT_OPERATION_TYPE;
171#endif
172
173 typedef PVOID RESID;
174 typedef HANDLE RESOURCE_HANDLE;
175
176 typedef struct RESOURCE_STATUS {
177 CLUSTER_RESOURCE_STATE ResourceState;
178 DWORD CheckPoint;
179 DWORD WaitHint;
180 HANDLE EventHandle;
181 } RESOURCE_STATUS,*PRESOURCE_STATUS;
182
183#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
184 struct NodeUtilizationInfoElement {
185 ULONGLONG Id;
186 ULONGLONG AvailableMemory;
187 ULONGLONG AvailableMemoryAfterReclamation;
188 };
189
190 struct ResourceUtilizationInfoElement {
191 ULONGLONG PhysicalNumaId;
192 ULONGLONG CurrentMemory;
193 };
194
195 typedef struct GET_OPERATION_CONTEXT_PARAMS {
196 DWORD Size;
197 DWORD Version;
198 RESDLL_CONTEXT_OPERATION_TYPE Type;
199 DWORD Priority;
200 } GET_OPERATION_CONTEXT_PARAMS,*PGET_OPERATION_CONTEXT_PARAMS;
201
202 typedef struct RESOURCE_STATUS_EX {
203 CLUSTER_RESOURCE_STATE ResourceState;
204 DWORD CheckPoint;
205 HANDLE EventHandle;
206 DWORD ApplicationSpecificErrorCode;
207 DWORD Flags;
208 } RESOURCE_STATUS_EX,*PRESOURCE_STATUS_EX;
209
210 typedef DWORD (_stdcall *PSET_RESOURCE_STATUS_ROUTINE_EX) (RESOURCE_HANDLE ResourceHandle, PRESOURCE_STATUS_EX ResourceStatus);
211#endif
212
213 typedef DWORD (_stdcall *PSET_RESOURCE_STATUS_ROUTINE) (RESOURCE_HANDLE ResourceHandle, PRESOURCE_STATUS ResourceStatus);
214 typedef VOID (_stdcall *PQUORUM_RESOURCE_LOST) (RESOURCE_HANDLE Resource);
215 typedef VOID (_stdcall *PLOG_EVENT_ROUTINE) (RESOURCE_HANDLE ResourceHandle, LOG_LEVEL LogLevel, LPCWSTR FormatString,...);
216 typedef RESID (_stdcall *POPEN_ROUTINE) (LPCWSTR ResourceName, HKEY ResourceKey, RESOURCE_HANDLE ResourceHandle);
217 typedef VOID (_stdcall *PCLOSE_ROUTINE) (RESID Resource);
218 typedef DWORD (_stdcall *PONLINE_ROUTINE) (RESID Resource, LPHANDLE EventHandle);
219 typedef DWORD (_stdcall *POFFLINE_ROUTINE) (RESID Resource);
220 typedef VOID (_stdcall *PTERMINATE_ROUTINE) (RESID Resource);
221 typedef WINBOOL (_stdcall *PIS_ALIVE_ROUTINE) (RESID Resource);
222 typedef WINBOOL (_stdcall *PLOOKS_ALIVE_ROUTINE) (RESID Resource);
223 typedef DWORD (_stdcall *PARBITRATE_ROUTINE) (RESID Resource, PQUORUM_RESOURCE_LOST LostQuorumResource);
224 typedef DWORD (_stdcall *PRELEASE_ROUTINE) (RESID Resource);
225 typedef DWORD (_stdcall *PRESOURCE_CONTROL_ROUTINE) (RESID Resource, DWORD ControlCode, PVOID InBuffer, DWORD InBufferSize, PVOID OutBuffer, DWORD OutBufferSize, LPDWORD BytesReturned);
226 typedef DWORD (_stdcall *PRESOURCE_TYPE_CONTROL_ROUTINE) (LPCWSTR ResourceTypeName, DWORD ControlCode, PVOID InBuffer, DWORD InBufferSize, PVOID OutBuffer, DWORD OutBufferSize, LPDWORD BytesReturned);
227
228#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
229 typedef RESID (_stdcall *POPEN_V2_ROUTINE) (LPCWSTR ResourceName, HKEY ResourceKey, RESOURCE_HANDLE ResourceHandle, DWORD OpenFlags);
230 typedef DWORD (_stdcall *PONLINE_V2_ROUTINE) (RESID Resource, LPHANDLE EventHandle, DWORD OnlineFlags, PBYTE InBuffer, DWORD InBufferSize, DWORD Reserved);
231 typedef DWORD (_stdcall *POFFLINE_V2_ROUTINE) (RESID Resource, LPCWSTR DestinationNodeName, DWORD OfflineFlags, PBYTE InBuffer, DWORD InBufferSize, DWORD Reserved);
232 typedef DWORD (_stdcall *PCANCEL_ROUTINE) (RESID Resource, DWORD CancelFlags_RESERVED);
233#endif
234
235 typedef struct CLRES_V1_FUNCTIONS {
236 POPEN_ROUTINE Open;
237 PCLOSE_ROUTINE Close;
238 PONLINE_ROUTINE Online;
239 POFFLINE_ROUTINE Offline;
240 PTERMINATE_ROUTINE Terminate;
241 PLOOKS_ALIVE_ROUTINE LooksAlive;
242 PIS_ALIVE_ROUTINE IsAlive;
243 PARBITRATE_ROUTINE Arbitrate;
244 PRELEASE_ROUTINE Release;
245 PRESOURCE_CONTROL_ROUTINE ResourceControl;
246 PRESOURCE_TYPE_CONTROL_ROUTINE ResourceTypeControl;
247 } CLRES_V1_FUNCTIONS,*PCLRES_V1_FUNCTIONS;
248
249#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
250 typedef struct CLRES_V2_FUNCTIONS {
251 POPEN_V2_ROUTINE Open;
252 PCLOSE_ROUTINE Close;
253 PONLINE_V2_ROUTINE Online;
254 POFFLINE_V2_ROUTINE Offline;
255 PTERMINATE_ROUTINE Terminate;
256 PLOOKS_ALIVE_ROUTINE LooksAlive;
257 PIS_ALIVE_ROUTINE IsAlive;
258 PARBITRATE_ROUTINE Arbitrate;
259 PRELEASE_ROUTINE Release;
260 PRESOURCE_CONTROL_ROUTINE ResourceControl;
261 PRESOURCE_TYPE_CONTROL_ROUTINE ResourceTypeControl;
262 PCANCEL_ROUTINE Cancel;
263 } CLRES_V2_FUNCTIONS,*PCLRES_V2_FUNCTIONS;
264#endif
265
266 typedef struct CLRES_FUNCTION_TABLE {
267 DWORD TableSize;
268 DWORD Version;
269 __C89_NAMELESS union {
270 CLRES_V1_FUNCTIONS V1Functions;
271#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
272 CLRES_V2_FUNCTIONS V2Functions;
273#endif
274 } DUMMYUNIONNAME;
275 } CLRES_FUNCTION_TABLE,*PCLRES_FUNCTION_TABLE;
276
277 typedef struct RESUTIL_LARGEINT_DATA {
278 LARGE_INTEGER Default;
279 LARGE_INTEGER Minimum;
280 LARGE_INTEGER Maximum;
281 } RESUTIL_LARGEINT_DATA,*PRESUTIL_LARGEINT_DATA;
282
283 typedef struct RESUTIL_ULARGEINT_DATA {
284 ULARGE_INTEGER Default;
285 ULARGE_INTEGER Minimum;
286 ULARGE_INTEGER Maximum;
287 } RESUTIL_ULARGEINT_DATA,*PRESUTIL_ULARGEINT_DATA;
288
289 typedef struct RESUTIL_FILETIME_DATA {
290 FILETIME Default;
291 FILETIME Minimum;
292 FILETIME Maximum;
293 } RESUTIL_FILETIME_DATA,*PRESUTIL_FILETIME_DATA;
294
295 typedef struct RESUTIL_PROPERTY_ITEM {
296 LPWSTR Name;
297 LPWSTR KeyName;
298 DWORD Format;
299 __C89_NAMELESS union {
300 DWORD_PTR DefaultPtr;
301 DWORD Default;
302 LPVOID lpDefault;
303 PRESUTIL_LARGEINT_DATA LargeIntData;
304 PRESUTIL_ULARGEINT_DATA ULargeIntData;
305 PRESUTIL_FILETIME_DATA FileTimeData;
306 } DUMMYUNIONNAME;
307 DWORD Minimum;
308 DWORD Maximum;
309 DWORD Flags;
310 DWORD Offset;
311 } RESUTIL_PROPERTY_ITEM,*PRESUTIL_PROPERTY_ITEM;
312
313 typedef struct CLUS_WORKER {
314 HANDLE hThread;
315 WINBOOL Terminate;
316 } CLUS_WORKER,*PCLUS_WORKER;
317
318 typedef DWORD (_stdcall *PSTARTUP_ROUTINE) (LPCWSTR ResourceType, DWORD MinVersionSupported, DWORD MaxVersionSupported, PSET_RESOURCE_STATUS_ROUTINE SetResourceStatus, PLOG_EVENT_ROUTINE LogEvent, PCLRES_FUNCTION_TABLE *FunctionTable);
319
320#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
321 typedef DWORD (_stdcall *PSET_RESOURCE_LOCKED_MODE_ROUTINE) (RESOURCE_HANDLE ResourceHandle, WINBOOL LockedModeEnabled, DWORD LockedModeReason);
322 typedef DWORD (_stdcall *PSIGNAL_FAILURE_ROUTINE) (RESOURCE_HANDLE ResourceHandle, WINBOOL IsEmbeddedFailure, DWORD ApplicationSpecificErrorCode);
323 typedef DWORD (_stdcall *PSET_RESOURCE_INMEMORY_NODELOCAL_PROPERTIES_ROUTINE) (RESOURCE_HANDLE ResourceHandle, unsigned char *propertyListBuffer, DWORD propertyListBufferSize);
324
325 typedef struct CLRES_CALLBACK_FUNCTION_TABLE {
326 PLOG_EVENT_ROUTINE LogEvent;
327 PSET_RESOURCE_STATUS_ROUTINE_EX SetResourceStatusEx;
328 PSET_RESOURCE_LOCKED_MODE_ROUTINE SetResourceLockedMode;
329 PSIGNAL_FAILURE_ROUTINE SignalFailure;
330 PSET_RESOURCE_INMEMORY_NODELOCAL_PROPERTIES_ROUTINE SetResourceInMemoryNodeLocalProperties;
331 } CLRES_CALLBACK_FUNCTION_TABLE,*PCLRES_CALLBACK_FUNCTION_TABLE;
332
333 typedef DWORD (_stdcall *PSTARTUP_EX_ROUTINE) (LPCWSTR ResourceType, DWORD MinVersionSupported, DWORD MaxVersionSupported, PCLRES_CALLBACK_FUNCTION_TABLE MonitorCallbackFunctions, PCLRES_FUNCTION_TABLE *ResourceDllInterfaceFunctions);
334#endif
335
336 typedef enum RESOURCE_MONITOR_STATE {
337 RmonInitializing,
338 RmonIdle,
339 RmonStartingResource,
340 RmonInitializingResource,
341 RmonOnlineResource,
342 RmonOfflineResource,
343 RmonShutdownResource,
344 RmonDeletingResource,
345 RmonIsAlivePoll,
346 RmonLooksAlivePoll,
347 RmonArbitrateResource,
348 RmonReleaseResource,
349 RmonResourceControl,
350 RmonResourceTypeControl,
351 RmonTerminateResource,
352 RmonDeadlocked
353 } RESOURCE_MONITOR_STATE;
354
355 typedef struct MONITOR_STATE {
356 LARGE_INTEGER LastUpdate;
357 RESOURCE_MONITOR_STATE State;
358 HANDLE ActiveResource;
359 WINBOOL ResmonStop;
360 } MONITOR_STATE,*PMONITOR_STATE;
361
362 typedef DWORD (WINAPI *PRESUTIL_START_RESOURCE_SERVICE) (LPCWSTR pszServiceName, LPSC_HANDLE phServiceHandle);
363 typedef DWORD (WINAPI *PRESUTIL_VERIFY_RESOURCE_SERVICE) (LPCWSTR pszServiceName);
364 typedef DWORD (WINAPI *PRESUTIL_STOP_RESOURCE_SERVICE) (LPCWSTR pszServiceName);
365 typedef DWORD (WINAPI *PRESUTIL_VERIFY_SERVICE) (SC_HANDLE hServiceHandle);
366 typedef DWORD (WINAPI *PRESUTIL_STOP_SERVICE) (SC_HANDLE hServiceHandle);
367 typedef DWORD (WINAPI *PRESUTIL_CREATE_DIRECTORY_TREE) (LPCWSTR pszPath);
368 typedef WINBOOL (WINAPI *PRESUTIL_IS_PATH_VALID) (LPCWSTR pszPath);
369 typedef DWORD (WINAPI *PRESUTIL_ENUM_PROPERTIES) (const PRESUTIL_PROPERTY_ITEM pPropertyTable, LPWSTR pszOutProperties, DWORD cbOutPropertiesSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
370 typedef DWORD (WINAPI *PRESUTIL_ENUM_PRIVATE_PROPERTIES) (HKEY hkeyClusterKey, LPWSTR pszOutProperties, DWORD cbOutPropertiesSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
371 typedef DWORD (WINAPI *PRESUTIL_GET_PROPERTIES) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyList, DWORD cbOutPropertyListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
372 typedef DWORD (WINAPI *PRESUTIL_GET_ALL_PROPERTIES) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyList, DWORD cbOutPropertyListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
373 typedef DWORD (WINAPI *PRESUTIL_GET_PRIVATE_PROPERTIES) (HKEY hkeyClusterKey, PVOID pOutPropertyList, DWORD cbOutPropertyListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
374 typedef DWORD (WINAPI *PRESUTIL_GET_PROPERTY_SIZE) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTableItem, LPDWORD pcbOutPropertyListSize, LPDWORD pnPropertyCount);
375 typedef DWORD (WINAPI *PRESUTIL_GET_PROPERTY) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTableItem, PVOID *pOutPropertyItem, LPDWORD pcbOutPropertyItemSize);
376 typedef DWORD (WINAPI *PRESUTIL_VERIFY_PROPERTY_TABLE) (const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, WINBOOL bAllowUnknownProperties, const PVOID pInPropertyList, DWORD cbInPropertyListSize, LPBYTE pOutParams);
377 typedef DWORD (WINAPI *PRESUTIL_SET_PROPERTY_TABLE) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, WINBOOL bAllowUnknownProperties, const PVOID pInPropertyList, DWORD cbInPropertyListSize, LPBYTE pOutParams);
378 typedef DWORD (WINAPI *PRESUTIL_SET_PROPERTY_TABLE_EX) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, WINBOOL bAllowUnknownProperties, const PVOID pInPropertyList, DWORD cbInPropertyListSize, WINBOOL bForceWrite, LPBYTE pOutParams);
379 typedef DWORD (WINAPI *PRESUTIL_SET_PROPERTY_PARAMETER_BLOCK) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, const LPBYTE pInParams, const PVOID pInPropertyList, DWORD cbInPropertyListSize, LPBYTE pOutParams);
380 typedef DWORD (WINAPI *PRESUTIL_SET_PROPERTY_PARAMETER_BLOCK_EX) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, const LPBYTE pInParams, const PVOID pInPropertyList, DWORD cbInPropertyListSize, WINBOOL bForceWrite, LPBYTE pOutParams);
381 typedef DWORD (WINAPI *PRESUTIL_SET_UNKNOWN_PROPERTIES) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, const PVOID pInPropertyList, DWORD cbInPropertyListSize);
382 typedef DWORD (WINAPI *PRESUTIL_GET_PROPERTIES_TO_PARAMETER_BLOCK) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, LPBYTE pOutParams, WINBOOL bCheckForRequiredProperties, LPWSTR *pszNameOfPropInError);
383 typedef DWORD (WINAPI *PRESUTIL_GET_PROPERTIES_TO_PARAMETER_BLOCK) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, LPBYTE pOutParams, WINBOOL bCheckForRequiredProperties, LPWSTR *pszNameOfPropInError);
384 typedef DWORD (WINAPI *PRESUTIL_PROPERTY_LIST_FROM_PARAMETER_BLOCK) (const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyList, LPDWORD pcbOutPropertyListSize, const LPBYTE pInParams, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
385 typedef DWORD (WINAPI *PRESUTIL_DUP_PARAMETER_BLOCK) (LPBYTE pOutParams, const LPBYTE pInParams, const PRESUTIL_PROPERTY_ITEM pPropertyTable);
386 typedef void (WINAPI *PRESUTIL_FREE_PARAMETER_BLOCK) (LPBYTE pOutParams, const LPBYTE pInParams, const PRESUTIL_PROPERTY_ITEM pPropertyTable);
387 typedef DWORD (WINAPI *PRESUTIL_ADD_UNKNOWN_PROPERTIES) (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyList, DWORD pcbOutPropertyListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
388 typedef DWORD (WINAPI *PRESUTIL_SET_PRIVATE_PROPERTY_LIST) (HKEY hkeyClusterKey, const PVOID pInPropertyList, DWORD cbInPropertyListSize);
389 typedef DWORD (WINAPI *PRESUTIL_VERIFY_PRIVATE_PROPERTY_LIST) (const PVOID pInPropertyList, DWORD cbInPropertyListSize);
390 typedef PWSTR (WINAPI *PRESUTIL_DUP_STRING) (LPCWSTR pszInString);
391 typedef DWORD (WINAPI *PRESUTIL_GET_BINARY_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPBYTE *ppbOutValue, LPDWORD pcbOutValueSize);
392 typedef LPWSTR (WINAPI *PRESUTIL_GET_SZ_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName);
393 typedef LPWSTR (WINAPI *PRESUTIL_GET_EXPAND_SZ_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, WINBOOL bExpand);
394 typedef DWORD (WINAPI *PRESUTIL_GET_DWORD_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPDWORD pdwOutValue, DWORD dwDefaultValue);
395 typedef DWORD (WINAPI *PRESUTIL_GET_QWORD_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, PULONGLONG pqwOutValue, ULONGLONG qwDefaultValue);
396 typedef DWORD (WINAPI *PRESUTIL_SET_BINARY_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, const LPBYTE pbNewValue, DWORD cbNewValueSize, LPBYTE *ppbOutValue, LPDWORD pcbOutValueSize);
397 typedef DWORD (WINAPI *PRESUTIL_SET_SZ_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPCWSTR pszNewValue, LPWSTR *ppszOutString);
398 typedef DWORD (WINAPI *PRESUTIL_SET_EXPAND_SZ_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPCWSTR pszNewValue, LPWSTR *ppszOutString);
399 typedef DWORD (WINAPI *PRESUTIL_SET_MULTI_SZ_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPCWSTR pszNewValue, DWORD cbNewValueSize, LPWSTR *ppszOutValue, LPDWORD pcbOutValueSize);
400 typedef DWORD (WINAPI *PRESUTIL_SET_DWORD_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, DWORD dwNewValue, LPDWORD pdwOutValue);
401 typedef DWORD (WINAPI *PRESUTIL_SET_QWORD_VALUE) (HKEY hkeyClusterKey, LPCWSTR pszValueName, ULONGLONG qwNewValue, PULONGLONG pqwOutValue);
402 typedef DWORD (WINAPI *PRESUTIL_GET_BINARY_PROPERTY) (LPBYTE *ppbOutValue, LPDWORD pcbOutValueSize, const PCLUSPROP_BINARY pValueStruct, const LPBYTE pbOldValue, DWORD cbOldValueSize, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
403 typedef DWORD (WINAPI *PRESUTIL_GET_SZ_PROPERTY) (LPWSTR *ppszOutValue, const PCLUSPROP_SZ pValueStruct, LPCWSTR pszOldValue, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
404 typedef DWORD (WINAPI *PRESUTIL_GET_MULTI_SZ_PROPERTY) (LPWSTR *ppszOutValue, LPDWORD pcbOutValueSize, const PCLUSPROP_SZ pValueStruct, LPCWSTR pszOldValue, DWORD cbOldValueSize, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
405 typedef DWORD (WINAPI *PRESUTIL_GET_DWORD_PROPERTY) (LPDWORD pdwOutValue, const PCLUSPROP_DWORD pValueStruct, DWORD dwOldValue, DWORD dwMinimum, DWORD dwMaximum, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
406 typedef DWORD (WINAPI *PRESUTIL_GET_LONG_PROPERTY) (LPLONG plOutValue, const PCLUSPROP_LONG pValueStruct, LONG lOldValue, LONG lMinimum, LONG lMaximum, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
407 typedef DWORD (WINAPI *PRESUTIL_GET_FILETIME_PROPERTY) (LPFILETIME pftOutValue, const PCLUSPROP_FILETIME pValueStruct, FILETIME ftOldValue, FILETIME ftMinimum, FILETIME ftMaximum, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
408 typedef LPVOID (WINAPI *PRESUTIL_GET_ENVIRONMENT_WITH_NET_NAME) (HRESOURCE hResource);
409 typedef DWORD (WINAPI *PRESUTIL_FREE_ENVIRONMENT) (LPVOID lpEnvironment);
410 typedef LPWSTR (WINAPI *PRESUTIL_EXPAND_ENVIRONMENT_STRINGS) (LPCWSTR pszSrc);
411 typedef DWORD (WINAPI *PRESUTIL_SET_RESOURCE_SERVICE_ENVIRONMENT) (LPCWSTR pszServiceName, HRESOURCE hResource, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
412 typedef DWORD (WINAPI *PRESUTIL_REMOVE_RESOURCE_SERVICE_ENVIRONMENT) (LPCWSTR pszServiceName, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
413 typedef DWORD (WINAPI *PRESUTIL_SET_RESOURCE_SERVICE_START_PARAMETERS) (LPCWSTR pszServiceName, SC_HANDLE schSCMHandle, LPSC_HANDLE phService, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
414 typedef DWORD (WINAPI *PRESUTIL_FIND_SZ_PROPERTY) (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPWSTR *pszPropertyValue);
415 typedef DWORD (WINAPI *PRESUTIL_FIND_EXPAND_SZ_PROPERTY) (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPWSTR *pszPropertyValue);
416 typedef DWORD (WINAPI *PRESUTIL_FIND_EXPANDED_SZ_PROPERTY) (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPWSTR *pszPropertyValue);
417 typedef DWORD (WINAPI *PRESUTIL_FIND_DWORD_PROPERTY) (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPDWORD pdwPropertyValue);
418 typedef DWORD (WINAPI *PRESUTIL_FIND_BINARY_PROPERTY) (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPBYTE *pbPropertyValue, LPDWORD pcbPropertyValueSize);
419 typedef DWORD (WINAPI *PRESUTIL_FIND_MULTI_SZ_PROPERTY) (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPWSTR *pszPropertyValue, LPDWORD pcbPropertyValueSize);
420 typedef DWORD (WINAPI *PRESUTIL_FIND_LONG_PROPERTY) (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPLONG plPropertyValue);
421 typedef DWORD (WINAPI *PRESUTIL_FIND_FILETIME_PROPERTY) (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPFILETIME pftPropertyValue);
422 typedef DWORD (WINAPI *PWORKER_START_ROUTINE) (PCLUS_WORKER pWorker, LPVOID lpThreadParameter);
423 typedef DWORD (WINAPI *PCLUSAPI_CLUS_WORKER_CREATE) (PCLUS_WORKER lpWorker, PWORKER_START_ROUTINE lpStartAddress, PVOID lpParameter);
424 typedef WINBOOL (WINAPI *PCLUSAPIClusWorkerCheckTerminate) (PCLUS_WORKER lpWorker);
425 typedef VOID (WINAPI *PCLUSAPI_CLUS_WORKER_TERMINATE) (PCLUS_WORKER lpWorker);
426 typedef DWORD (*LPRESOURCE_CALLBACK) (HRESOURCE, HRESOURCE, PVOID);
427 typedef DWORD (*LPRESOURCE_CALLBACK_EX) (HCLUSTER, HRESOURCE, HRESOURCE, PVOID);
428 typedef WINBOOL (WINAPI *PRESUTIL_RESOURCES_EQUAL) (HRESOURCE hSelf, HRESOURCE hResource);
429 typedef WINBOOL (WINAPI *PRESUTIL_RESOURCE_TYPES_EQUAL) (LPCWSTR lpszResourceTypeName, HRESOURCE hResource);
430 typedef WINBOOL (WINAPI *PRESUTIL_IS_RESOURCE_CLASS_EQUAL) (PCLUS_RESOURCE_CLASS_INFO prci, HRESOURCE hResource);
431 typedef DWORD (WINAPI *PRESUTIL_ENUM_RESOURCES) (HRESOURCE hSelf, LPCWSTR lpszResTypeName, LPRESOURCE_CALLBACK pResCallBack, PVOID pParameter);
432 typedef DWORD (WINAPI *PRESUTIL_ENUM_RESOURCES_EX) (HCLUSTER hCluster, HRESOURCE hSelf, LPCWSTR lpszResTypeName, LPRESOURCE_CALLBACK_EX pResCallBack, PVOID pParameter);
433 typedef HRESOURCE (WINAPI *PRESUTIL_GET_RESOURCE_DEPENDENCY) (HANDLE hSelf, LPCWSTR lpszResourceType);
434 typedef HRESOURCE (WINAPI *PRESUTIL_GET_RESOURCE_DEPENDENCY_BY_NAME) (HCLUSTER hCluster, HANDLE hSelf, LPCWSTR lpszResourceType, WINBOOL bRecurse);
435 typedef HRESOURCE (WINAPI *PRESUTIL_GET_RESOURCE_DEPENDENCY_BY_CLASS) (HCLUSTER hCluster, HANDLE hSelf, PCLUS_RESOURCE_CLASS_INFO prci, WINBOOL bRecurse);
436 typedef HRESOURCE (WINAPI *PRESUTIL_GET_RESOURCE_NAME_DEPENDENCY) (LPCWSTR lpszResourceName, LPCWSTR lpszResourceType);
437 typedef DWORD (WINAPI *PRESUTIL_GET_RESOURCE_DEPENDENTIP_ADDRESS_PROPS) (HRESOURCE hResource, LPWSTR pszAddress, DWORD *pcchAddress, LPWSTR pszSubnetMask, DWORD *pcchSubnetMask, LPWSTR pszNetwork, DWORD *pcchNetwork);
438 typedef DWORD (WINAPI *PRESUTIL_FIND_DEPENDENT_DISK_RESOURCE_DRIVE_LETTER) (HCLUSTER hCluster, HRESOURCE hResource, LPWSTR pszDriveLetter, DWORD *pcchDriveLetter);
439 typedef DWORD (WINAPI *PRESUTIL_TERMINATE_SERVICE_PROCESS_FROM_RES_DLL) (DWORD dwServicePid, WINBOOL bOffline, PDWORD pdwResourceState, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
440 typedef DWORD (WINAPI *PRESUTIL_GET_PROPERTY_FORMATS) (const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyFormatList, DWORD cbPropertyFormatListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
441 typedef DWORD (WINAPI *PRESUTIL_GET_CORE_CLUSTER_RESOURCES) (HCLUSTER hCluster, HRESOURCE *phClusterNameResource, HRESOURCE *phClusterIPAddressResource, HRESOURCE *phClusterQuorumResource);
442 typedef DWORD (WINAPI *PRESUTIL_GET_RESOURCE_NAME) (HRESOURCE hResource, PWSTR pszResourceName, DWORD *pcchResourceNameInOut);
443 typedef WINBOOL (WINAPI *PCLUSTER_IS_PATH_ON_SHARED_VOLUME) (LPCWSTR lpszPathName);
444 typedef WINBOOL (WINAPI *PCLUSTER_GET_VOLUME_PATH_NAME) (LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, DWORD cchBufferLength);
445 typedef WINBOOL (WINAPI *PCLUSTER_GET_VOLUME_NAME_FOR_VOLUME_MOUNT_POINT) (LPCWSTR lpszVolumeMountPoint, LPWSTR lpszVolumeName, DWORD cchBufferLength);
446 typedef DWORD (WINAPI *PCLUSTER_PREPARE_SHARED_VOLUME_FOR_BACKUP) (LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, LPDWORD lpcchVolumePathName, LPWSTR lpszVolumeName, LPDWORD lpcchVolumeName);
447 typedef DWORD (WINAPI *PCLUSTER_CLEAR_BACKUP_STATE_FOR_SHARED_VOLUME) (LPCWSTR lpszVolumePathName);
448#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
449 typedef DWORD (WINAPI *PRESUTIL_SET_RESOURCE_SERVICE_START_PARAMETERS_EX) (LPCWSTR pszServiceName, SC_HANDLE schSCMHandle, LPSC_HANDLE phService, DWORD dwDesiredAccess, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
450 typedef DWORD (WINAPI *PRESUTIL_ENUM_RESOURCES_EX2) (HCLUSTER hCluster, HRESOURCE hSelf, LPCWSTR lpszResTypeName, LPRESOURCE_CALLBACK_EX pResCallBack, PVOID pParameter, DWORD dwDesiredAccess);
451 typedef HRESOURCE (WINAPI *PRESUTIL_GET_RESOURCE_DEPENDENCY_EX) (HANDLE hSelf, LPCWSTR lpszResourceType, DWORD dwDesiredAccess);
452 typedef HRESOURCE (WINAPI *PRESUTIL_GET_RESOURCE_DEPENDENCY_BY_NAME_EX) (HCLUSTER hCluster, HANDLE hSelf, LPCWSTR lpszResourceType, WINBOOL bRecurse, DWORD dwDesiredAccess);
453 typedef HRESOURCE (WINAPI *PRESUTIL_GET_RESOURCE_DEPENDENCY_BY_CLASS_EX) (HCLUSTER hCluster, HANDLE hSelf, PCLUS_RESOURCE_CLASS_INFO prci, WINBOOL bRecurse, DWORD dwDesiredAccess);
454 typedef HRESOURCE (WINAPI *PRESUTIL_GET_RESOURCE_NAME_DEPENDENCY_EX) (LPCWSTR lpszResourceName, LPCWSTR lpszResourceType, DWORD dwDesiredAccess);
455 typedef DWORD (WINAPI *PRESUTIL_GET_CORE_CLUSTER_RESOURCES_EX) (HCLUSTER hClusterIn, HRESOURCE *phClusterNameResourceOut, HRESOURCE *phClusterIPAddressResourceOut, HRESOURCE *phClusterQuorumResourceOut, DWORD dwDesiredAccess);
456#endif
457
458 DWORD WINAPI ResUtilStartResourceService (LPCWSTR pszServiceName, LPSC_HANDLE phServiceHandle);
459 DWORD WINAPI ResUtilVerifyResourceService (LPCWSTR pszServiceName);
460 DWORD WINAPI ResUtilStopResourceService (LPCWSTR pszServiceName);
461 DWORD WINAPI ResUtilVerifyService (SC_HANDLE hServiceHandle);
462 DWORD WINAPI ResUtilStopService (SC_HANDLE hServiceHandle);
463 DWORD WINAPI ResUtilCreateDirectoryTree (LPCWSTR pszPath);
464 WINBOOL WINAPI ResUtilIsPathValid (LPCWSTR pszPath);
465 DWORD WINAPI ResUtilEnumProperties (const PRESUTIL_PROPERTY_ITEM pPropertyTable, LPWSTR pszOutProperties, DWORD cbOutPropertiesSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
466 DWORD WINAPI ResUtilEnumPrivateProperties (HKEY hkeyClusterKey, LPWSTR pszOutProperties, DWORD cbOutPropertiesSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
467 DWORD WINAPI ResUtilGetProperties (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyList, DWORD cbOutPropertyListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
468 DWORD WINAPI ResUtilGetAllProperties (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyList, DWORD cbOutPropertyListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
469 DWORD WINAPI ResUtilGetPrivateProperties (HKEY hkeyClusterKey, PVOID pOutPropertyList, DWORD cbOutPropertyListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
470 DWORD WINAPI ResUtilGetPropertySize (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTableItem, LPDWORD pcbOutPropertyListSize, LPDWORD pnPropertyCount);
471 DWORD WINAPI ResUtilGetProperty (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTableItem, PVOID *pOutPropertyItem, LPDWORD pcbOutPropertyItemSize);
472 DWORD WINAPI ResUtilVerifyPropertyTable (const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, WINBOOL bAllowUnknownProperties, const PVOID pInPropertyList, DWORD cbInPropertyListSize, LPBYTE pOutParams);
473 DWORD WINAPI ResUtilSetPropertyTable (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, WINBOOL bAllowUnknownProperties, const PVOID pInPropertyList, DWORD cbInPropertyListSize, LPBYTE pOutParams);
474 DWORD WINAPI ResUtilSetPropertyTableEx (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, WINBOOL bAllowUnknownProperties, const PVOID pInPropertyList, DWORD cbInPropertyListSize, WINBOOL bForceWrite, LPBYTE pOutParams);
475 DWORD WINAPI ResUtilSetPropertyParameterBlock (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, const LPBYTE pInParams, const PVOID pInPropertyList, DWORD cbInPropertyListSize, LPBYTE pOutParams);
476 DWORD WINAPI ResUtilSetPropertyParameterBlockEx (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID Reserved, const LPBYTE pInParams, const PVOID pInPropertyList, DWORD cbInPropertyListSize, WINBOOL bForceWrite, LPBYTE pOutParams);
477 DWORD WINAPI ResUtilSetUnknownProperties (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, const PVOID pInPropertyList, DWORD cbInPropertyListSize);
478 DWORD WINAPI ResUtilGetPropertiesToParameterBlock (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, LPBYTE pOutParams, WINBOOL bCheckForRequiredProperties, LPWSTR *pszNameOfPropInError);
479 DWORD WINAPI ResUtilPropertyListFromParameterBlock (const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyList, LPDWORD pcbOutPropertyListSize, const LPBYTE pInParams, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
480 DWORD WINAPI ResUtilDupParameterBlock (LPBYTE pOutParams, const LPBYTE pInParams, const PRESUTIL_PROPERTY_ITEM pPropertyTable);
481 void WINAPI ResUtilFreeParameterBlock (LPBYTE pOutParams, const LPBYTE pInParams, const PRESUTIL_PROPERTY_ITEM pPropertyTable);
482 DWORD WINAPI ResUtilAddUnknownProperties (HKEY hkeyClusterKey, const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyList, DWORD pcbOutPropertyListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
483 DWORD WINAPI ResUtilSetPrivatePropertyList (HKEY hkeyClusterKey, const PVOID pInPropertyList, DWORD cbInPropertyListSize);
484 DWORD WINAPI ResUtilVerifyPrivatePropertyList (const PVOID pInPropertyList, DWORD cbInPropertyListSize);
485 PWSTR WINAPI ResUtilDupString (LPCWSTR pszInString);
486 DWORD WINAPI ResUtilGetBinaryValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPBYTE *ppbOutValue, LPDWORD pcbOutValueSize);
487 LPWSTR WINAPI ResUtilGetSzValue (HKEY hkeyClusterKey, LPCWSTR pszValueName);
488 LPWSTR WINAPI ResUtilGetExpandSzValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, WINBOOL bExpand);
489 DWORD WINAPI ResUtilGetDwordValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPDWORD pdwOutValue, DWORD dwDefaultValue);
490 DWORD WINAPI ResUtilGetQwordValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, PULONGLONG pqwOutValue, ULONGLONG qwDefaultValue);
491 DWORD WINAPI ResUtilSetBinaryValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, const LPBYTE pbNewValue, DWORD cbNewValueSize, LPBYTE *ppbOutValue, LPDWORD pcbOutValueSize);
492 DWORD WINAPI ResUtilSetSzValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPCWSTR pszNewValue, LPWSTR *ppszOutString);
493 DWORD WINAPI ResUtilSetExpandSzValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPCWSTR pszNewValue, LPWSTR *ppszOutString);
494 DWORD WINAPI ResUtilSetMultiSzValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPCWSTR pszNewValue, DWORD cbNewValueSize, LPWSTR *ppszOutValue, LPDWORD pcbOutValueSize);
495 DWORD WINAPI ResUtilSetDwordValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, DWORD dwNewValue, LPDWORD pdwOutValue);
496 DWORD WINAPI ResUtilSetQwordValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, ULONGLONG qwNewValue, PULONGLONG pqwOutValue);
497 DWORD WINAPI ResUtilGetBinaryProperty (LPBYTE *ppbOutValue, LPDWORD pcbOutValueSize, const PCLUSPROP_BINARY pValueStruct, const LPBYTE pbOldValue, DWORD cbOldValueSize, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
498 DWORD WINAPI ResUtilGetSzProperty (LPWSTR *ppszOutValue, const PCLUSPROP_SZ pValueStruct, LPCWSTR pszOldValue, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
499 DWORD WINAPI ResUtilGetMultiSzProperty (LPWSTR *ppszOutValue, LPDWORD pcbOutValueSize, const PCLUSPROP_SZ pValueStruct, LPCWSTR pszOldValue, DWORD cbOldValueSize, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
500 DWORD WINAPI ResUtilGetDwordProperty (LPDWORD pdwOutValue, const PCLUSPROP_DWORD pValueStruct, DWORD dwOldValue, DWORD dwMinimum, DWORD dwMaximum, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
501 DWORD WINAPI ResUtilGetLongProperty (LPLONG plOutValue, const PCLUSPROP_LONG pValueStruct, LONG lOldValue, LONG lMinimum, LONG lMaximum, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
502 DWORD WINAPI ResUtilGetFileTimeProperty (LPFILETIME pftOutValue, const PCLUSPROP_FILETIME pValueStruct, FILETIME ftOldValue, FILETIME ftMinimum, FILETIME ftMaximum, LPBYTE *ppPropertyList, LPDWORD pcbPropertyListSize);
503 LPVOID WINAPI ResUtilGetEnvironmentWithNetName (HRESOURCE hResource);
504 DWORD WINAPI ResUtilFreeEnvironment (LPVOID lpEnvironment);
505 LPWSTR WINAPI ResUtilExpandEnvironmentStrings (LPCWSTR pszSrc);
506 DWORD WINAPI ResUtilSetResourceServiceEnvironment (LPCWSTR pszServiceName, HRESOURCE hResource, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
507 DWORD WINAPI ResUtilRemoveResourceServiceEnvironment (LPCWSTR pszServiceName, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
508 DWORD WINAPI ResUtilSetResourceServiceStartParameters (LPCWSTR pszServiceName, SC_HANDLE schSCMHandle, LPSC_HANDLE phService, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
509 DWORD WINAPI ResUtilFindSzProperty (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPWSTR *pszPropertyValue);
510 DWORD WINAPI ResUtilFindExpandSzProperty (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPWSTR *pszPropertyValue);
511 DWORD WINAPI ResUtilFindExpandedSzProperty (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPWSTR *pszPropertyValue);
512 DWORD WINAPI ResUtilFindDwordProperty (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPDWORD pdwPropertyValue);
513 DWORD WINAPI ResUtilFindBinaryProperty (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPBYTE *pbPropertyValue, LPDWORD pcbPropertyValueSize);
514 DWORD WINAPI ResUtilFindMultiSzProperty (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPWSTR *pszPropertyValue, LPDWORD pcbPropertyValueSize);
515 DWORD WINAPI ResUtilFindLongProperty (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPLONG plPropertyValue);
516 DWORD WINAPI ResUtilFindFileTimeProperty (const PVOID pPropertyList, DWORD cbPropertyListSize, LPCWSTR pszPropertyName, LPFILETIME pftPropertyValue);
517 DWORD WINAPI ClusWorkerCreate (PCLUS_WORKER lpWorker, PWORKER_START_ROUTINE lpStartAddress, PVOID lpParameter);
518 WINBOOL WINAPI ClusWorkerCheckTerminate (PCLUS_WORKER lpWorker);
519 VOID WINAPI ClusWorkerTerminate (PCLUS_WORKER lpWorker);
520 WINBOOL WINAPI ResUtilResourcesEqual (HRESOURCE hSelf, HRESOURCE hResource);
521 WINBOOL WINAPI ResUtilResourceTypesEqual (LPCWSTR lpszResourceTypeName, HRESOURCE hResource);
522 WINBOOL WINAPI ResUtilIsResourceClassEqual (PCLUS_RESOURCE_CLASS_INFO prci, HRESOURCE hResource);
523 DWORD WINAPI ResUtilEnumResources (HRESOURCE hSelf, LPCWSTR lpszResTypeName, LPRESOURCE_CALLBACK pResCallBack, PVOID pParameter);
524 DWORD WINAPI ResUtilEnumResourcesEx (HCLUSTER hCluster, HRESOURCE hSelf, LPCWSTR lpszResTypeName, LPRESOURCE_CALLBACK_EX pResCallBack, PVOID pParameter);
525 HRESOURCE WINAPI ResUtilGetResourceDependency (HANDLE hSelf, LPCWSTR lpszResourceType);
526 HRESOURCE WINAPI ResUtilGetResourceDependencyByName (HCLUSTER hCluster, HANDLE hSelf, LPCWSTR lpszResourceType, WINBOOL bRecurse);
527 HRESOURCE WINAPI ResUtilGetResourceDependencyByClass (HCLUSTER hCluster, HANDLE hSelf, PCLUS_RESOURCE_CLASS_INFO prci, WINBOOL bRecurse);
528 HRESOURCE WINAPI ResUtilGetResourceNameDependency (LPCWSTR lpszResourceName, LPCWSTR lpszResourceType);
529 DWORD WINAPI ResUtilGetResourceDependentIPAddressProps (HRESOURCE hResource, LPWSTR pszAddress, DWORD *pcchAddress, LPWSTR pszSubnetMask, DWORD *pcchSubnetMask, LPWSTR pszNetwork, DWORD *pcch_Network);
530 DWORD WINAPI ResUtilFindDependentDiskResourceDriveLetter (HCLUSTER hCluster, HRESOURCE hResource, LPWSTR pszDriveLetter, DWORD *pcchDriveLetter);
531 DWORD WINAPI ResUtilTerminateServiceProcessFromResDll (DWORD dwServicePid, WINBOOL bOffline, PDWORD pdwResourceState, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
532 DWORD WINAPI ResUtilGetPropertyFormats (const PRESUTIL_PROPERTY_ITEM pPropertyTable, PVOID pOutPropertyFormatList, DWORD cbPropertyFormatListSize, LPDWORD pcbBytesReturned, LPDWORD pcbRequired);
533 DWORD WINAPI ResUtilGetCoreClusterResources (HCLUSTER hCluster, HRESOURCE *phClusterNameResource, HRESOURCE *phClusterIPAddressResource, HRESOURCE *phClusterQuorumResource);
534 DWORD WINAPI ResUtilGetResourceName (HRESOURCE hResource, PWSTR pszResourceName, DWORD *pcchResourceNameInOut);
535 CLUSTER_ROLE_STATE WINAPI ResUtilGetClusterRoleState (HCLUSTER hCluster, CLUSTER_ROLE eClusterRole);
536 WINBOOL WINAPI ClusterIsPathOnSharedVolume (LPCWSTR lpszPathName);
537 WINBOOL WINAPI ClusterGetVolumePathName (LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, DWORD cchBufferLength);
538 WINBOOL WINAPI ClusterGetVolumeNameForVolumeMountPoint (LPCWSTR lpszVolumeMountPoint, LPWSTR lpszVolumeName, DWORD cchBufferLength);
539 DWORD WINAPI ClusterPrepareSharedVolumeForBackup (LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, LPDWORD lpcchVolumePathName, LPWSTR lpszVolumeName, LPDWORD lpcchVolumeName);
540 DWORD WINAPI ClusterClearBackupStateForSharedVolume (LPCWSTR lpszVolumePathName);
541#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
542 DWORD WINAPI ResUtilSetResourceServiceStartParametersEx (LPCWSTR pszServiceName, SC_HANDLE schSCMHandle, LPSC_HANDLE phService, DWORD dwDesiredAccess, PLOG_EVENT_ROUTINE pfnLogEvent, RESOURCE_HANDLE hResourceHandle);
543 DWORD WINAPI ResUtilEnumResourcesEx2 (HCLUSTER hCluster, HRESOURCE hSelf, LPCWSTR lpszResTypeName, LPRESOURCE_CALLBACK_EX pResCallBack, PVOID pParameter, DWORD dwDesiredAccess);
544 HRESOURCE WINAPI ResUtilGetResourceDependencyEx (HANDLE hSelf, LPCWSTR lpszResourceType, DWORD dwDesiredAccess);
545 HRESOURCE WINAPI ResUtilGetResourceDependencyByNameEx (HCLUSTER hCluster, HANDLE hSelf, LPCWSTR lpszResourceType, WINBOOL bRecurse, DWORD dwDesiredAccess);
546 HRESOURCE WINAPI ResUtilGetResourceDependencyByClassEx (HCLUSTER hCluster, HANDLE hSelf, PCLUS_RESOURCE_CLASS_INFO prci, WINBOOL bRecurse, DWORD dwDesiredAccess);
547 HRESOURCE WINAPI ResUtilGetResourceNameDependencyEx (LPCWSTR lpszResourceName, LPCWSTR lpszResourceType, DWORD dwDesiredAccess);
548 DWORD WINAPI ResUtilGetCoreClusterResourcesEx (HCLUSTER hClusterIn, HRESOURCE *phClusterNameResourceOut, HRESOURCE *phClusterQuorumResourceOut, DWORD dwDesiredAccess);
549#endif
550
551 FORCEINLINE DWORD WINAPI_INLINE ResUtilGetMultiSzValue (HKEY hkeyClusterKey, LPCWSTR pszValueName, LPWSTR *ppszOutValue, LPDWORD pcbOutValueSize) {
552 return ResUtilGetBinaryValue (hkeyClusterKey, pszValueName,(LPBYTE *) ppszOutValue, pcbOutValueSize);
553 }
554
555#ifdef __cplusplus
556}
557#endif
558
559#endif
560#endif
Note: See TracBrowser for help on using the repository browser.