SetClusterResourceDependencyExpression Function
Specifies the dependency expression to be associated with the resource referred to by hResource. Any existing dependency relationships for the resource will be overwritten.
Syntax
DWORD WINAPI SetClusterResourceDependencyExpression(
__in HRESOURCE hResource,
__in LPCWSTR lpszDependencyExpression
);
Parameters
hResource [in]
Handle to the resource.lpszDependencyExpression [in]
Address of Unicode string containing the dependency expression.
Return Value
ERROR_SUCCESS (0) if successful.
Remarks
The system only supports groups of OR expressions that are combined by using AND. The dependency expressions are described by this BNF grammar:
expression:
expression_part
| expression "and" expression_part
expression_part:
resourceId
| "(" or_expression ")"
| "(" and_expression ")"
or_expression:
resourceId
| or_expression "or" resourceId
and_expression:
resourceId
| and_expression "and" resourceId
This gives us expressions of the general form:( [id] or [id] ... ) and ( [id] or [id] ... ) and ...
For example: ([a904e1b7-95dd-47f0-9b2e-f1007d92699b] or [ae6fcf48-c42f-4960-a61a-7f1044067668]) and ([c471abc6-e454-482e-8be4-fae084cf799b] or [de976488-82cb-4950-8ce0-1b45e868e058])
Requirements
| Minimum supported client | None supported |
| Minimum supported server | Windows Server 2008 Datacenter Edition, Windows Server 2008 Enterprise Edition |
| Header | ClusApi.h |
| Library | ClusApi.lib |
| DLL | ClusApi.dll |
See Also
Cluster Registry Access Functions
GetClusterResourceDependencyExpression
Send comments about this topic to Microsoft
Build date: 2/9/2009