IClusCfgResourceTypeInfo::GetTypeName method

[This method is available for use only in Windows Server 2003.]

The GetTypeName method retrieves the resource type name of this resource type.

Syntax

HRESULT GetTypeName(
  [out] BSTR *pbstrTypeNameOut
);

Parameters

  • pbstrTypeNameOut [out]
    Pointer to a BSTR that receives the name of the resource type. The caller must free this string by calling SysFreeString.

Return value

The GetTypeName method returns one of the following values:

  • S_OK.
    The method successfully retrieved the type name.

  • E_OUTOFMEMORY
    Out of memory.

Any other HRESULT value indicates that the call failed.

Examples

The following example illustrates how a configuration object might implement GetTypeName.

HRESULT
CClusCfgMyResourceType::GetTypeName(
    BSTR * pbstrTypeNameOut
    )
{
    HRESULT     hr = S_OK;

    if ( pbstrTypeNameOut == NULL )
    {
        hr = E_POINTER;
        goto Cleanup;
    } // if: the output pointer is NULL

    *pbstrTypeNameOut = SysAllocString( MY_RESOURCE_TYPE_NAME );
    if ( *pbstrTypeNameOut == NULL )
    {
        hr = E_OUTOFMEMORY;
        goto Cleanup;
    } // if: memory for the resource type name could allocated

Cleanup:
    return hr;

} //*** CClusCfgMyResourceType::GetTypeName()

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003

End of server support

Windows Server 2003

IDL

ClusCfgServer.idl

IID

IID_IClusCfgResourceTypeInfo is defined as C649A281-C847-4F5C-9841-D2F73B5AA71D

See also

IClusCfgResourceTypeInfo