Windows desktop applications
Collapse the table of content
Expand the table of content

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 clientNone supported
Minimum supported serverWindows Server 2008 Datacenter Edition, Windows Server 2008 Enterprise Edition
HeaderClusApi.h
LibraryClusApi.lib
DLLClusApi.dll

See Also

Cluster Registry Access Functions
GetClusterResourceDependencyExpression


Send comments about this topic to Microsoft

Build date: 2/9/2009

Community Additions

Show:
© 2016 Microsoft