Export (0) Print
Expand All

CLUSPROP_SZ_DECLARE macro

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

This macro does not return a value.

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

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 Enterprise, Windows Server 2003 Datacenter

Header

ClusAPI.h

See also

CLUSPROP_SZ

 

 

Show:
© 2015 Microsoft