Share via


IDebugGenericParamField::GetNameOfFormalParam

Retrieves the name of this generic parameter.

HRESULT GetNameOfFormalParam (
   BSTR* pbstrName
);
int GetNameOfFormalParam (
   string pbstrName
);

Parameters

  • pbstrName
    [out] Name of this generic parameter.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Example

The following example shows how to implement this method for a CDebugGenericParamFieldType object that exposes the IDebugGenericParamField interface.

HRESULT CDebugGenericParamFieldType::GetNameOfFormalParam(BSTR *pbstrName)
{
    HRESULT hr = S_OK;
    CComBSTR bstrName;

    METHOD_ENTRY( CDebugGenericParamFieldType::GetNameOfFormalParam );

    IfFalseGo( pbstrName, E_INVALIDARG );
    IfFailGo( this->LoadProps() );
    IfNullGo( *pbstrName = SysAllocString(m_bstrName), E_OUTOFMEMORY );

Error:

    METHOD_EXIT( CDebugGenericParamFieldType::GetNameOfFormalParam, hr );
    return hr;
}

See Also

Reference

IDebugGenericParamField