CLUSPROP_SZ_DECLARE macro (clusapi.h)

Creates a CLUSPROP_SZ structure with the sz member set to a size determined by the caller.

Syntax

void CLUSPROP_SZ_DECLARE(
   name,
   cch
);

Parameters

name

Name of the CLUSPROP_SZ structure to be created.

cch

The size (that is, count of characters) of the sz member array. This value must be a constant.

Return value

None

Remarks

ClusAPI.h defines CLUSPROP_SZ_DECLARE as follows:

#define CLUSPROP_SZ_DECLARE( name, cch )    \
    struct {                                \
        CLUSPROP_SYNTAX Syntax;             \
        DWORD           cbLength;           \
        WCHAR           sz[(cch + 1) & ~1]; \
    } name

Examples

The following example shows how to use CLUSPROP_SZ_DECLARE:

WCHAR szNameData[] = L"Object Name";
CLUSPROP_SZ_DECLARE( NameValue, sizeof( szNameData ) / sizeof( WCHAR ) );
NameValue.Syntax.dw = CLUSPROP_SYNTAX_LIST_VALUE_SZ;
NameValue.cbLength = sizeof( szNameData );
StringCbCopy( NameValue.sz, NameValue.cbLength, szNameData );

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header clusapi.h

See also

CLUSPROP_SZ