다음을 통해 공유


ServiceName

Describes the short name of the Generic Service to run. The following table summarizes the attributes of the ServiceName property.

Attribute Value
Data type Null-terminated Unicode string
Access Read/write
Status Required
Structure CLUSPROP_SZ
Maximum None (but see Maximum Property Size.)
Default NULL

Remarks

For more information about service names, see the function CreateService.

The CLUSPROP_SZ_DECLARE macro creates a CLUSPROP_SZ structure with an array of the correct size.

Examples

The property value portion of a property list entry for ServiceName can be set with the following example code.

WCHAR szServiceNameData[] = L"MYSVC";
CLUSPROP_SZ_DECLARE( ServiceNameValue, 
                     sizeof(szServiceNameData) / sizeof(WCHAR) );
ServiceNameValue.Syntax.dw = CLUSPROP_SYNTAX_LIST_VALUE_SZ;
ServiceNameValue.cbLength = sizeof( szServiceNameData );
StringCbCopy( ServiceNameValue.sz, 
              ServiceNameValue.cbLength, 
              szServiceNameData );

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

See also

Generic Service Private Properties

CLUSPROP_SZ

CLUSPROP_SZ_DECLARE

CreateService