Skip to content

Latest commit

 

History

History
67 lines (55 loc) · 1.56 KB

idebuggenericparamfield-getnameofformalparam.md

File metadata and controls

67 lines (55 loc) · 1.56 KB
description title ms.date ms.topic helpviewer_keywords author ms.author manager ms.subservice dev_langs
Retrieves the name of this generic parameter.
IDebugGenericParamField::GetNameOfFormalParam
11/04/2016
reference
IDebugGenericParamField::GetNameOfFormalParam
GetNameOfFormalParam
maiak
maiak
mijacobs
debug-diagnostics
CPP
CSharp

IDebugGenericParamField::GetNameOfFormalParam

Retrieves the name of this generic parameter.

Syntax

int GetNameOfFormalParam (
    string pbstrName
);
HRESULT GetNameOfFormalParam (
    BSTR* 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