ClusterResourceTypeControl function

Initiates an operation affecting a resource type. The operation performed depends on the control code passed to the dwControlCode parameter.

Syntax


DWORD WINAPI ClusterResourceTypeControl(
  _In_      HCLUSTER hCluster,
  _In_      LPCWSTR  lpszResourceTypeName,
  _In_opt_  HNODE    hHostNode,
  _In_      DWORD    dwControlCode,
  _In_opt_  LPVOID   lpInBuffer,
  _In_      DWORD    nInBufferSize,
  _Out_opt_ LPVOID   lpOutBuffer,
  _In_      DWORD    nOutBufferSize,
  _Out_opt_ LPDWORD  lpBytesReturned
);

Parameters

hCluster [in]

Handle to the cluster containing the resource type identified in lpszResourceTypeName.

lpszResourceTypeName [in]

Pointer to a NULL-terminated Unicode string containing the name of the resource type to be affected.

hHostNode [in, optional]

Handle to the node hosting the affected resource type.

dwControlCode [in]

A resource type control code specifying the operation to be performed. For the syntax associated with a control code, refer to Control Code Architecture and the following topics:

lpInBuffer [in, optional]

Pointer to the input buffer with information needed for the operation, or NULL if no information is needed.

nInBufferSize [in]

Number of bytes in the buffer pointed to by lpInBuffer.

lpOutBuffer [out, optional]

Pointer to the output buffer with information resulting from the operation, or NULL if nothing will be returned.

nOutBufferSize [in]

Number of bytes in the output buffer pointed to by lpOutBuffer, or zero if the caller does not know how much data will be returned.

lpBytesReturned [out, optional]

Pointer to the number of bytes in the buffer pointed to by lpOutBuffer that were actually filled in as a result of the operation. The caller can pass NULL for lpBytesReturned if ClusterResourceTypeControl does not need to pass back the number of bytes in the output buffer.

Return value

The function returns one of the following values.

ERROR_SUCCESS

The operation was successful. If the operation required an output buffer, lpBytesReturned (if not NULL on input) points to the actual size of the data returned in the buffer.

ERROR_MORE_DATA

The output buffer pointed to by lpOutBuffer was not large enough to hold the data resulting from the operation. The lpBytesReturned parameter (if not NULL on input) points to the size required for the output buffer. Only operations requiring an output buffer return ERROR_MORE_DATA. If the lpOutBuffer parameter is NULL and the nOutBufferSize parameter is zero, then ERROR_SUCCESS may be returned, not ERROR_MORE_DATA.

System error code

The operation was not successful. If the operation required an output buffer, the value specified by lpBytesReturned is unreliable.

Remarks

When ClusterResourceTypeControl returns ERROR_MORE_DATA, set nOutBufferSize to the number of bytes pointed to by lpBytesReturned, and call the function again.

Do not pass LPC and RPC handles to the same function call. Otherwise, the call will raise an RPC exception and can have additional destructive effects. For information on how LPC and RPC handles are created, see LPC and RPC Handles and OpenCluster.

ClusterResourceTypeControl is one of the control code functions. For more information on control codes and control code functions, see Using Control Codes.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

Header

ClusAPI.h

Library

ClusAPI.lib

DLL

ClusAPI.dll

See also

OpenCluster
Resource Type Control Codes

 

 

Show: