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 |
|
maiak |
maiak |
mijacobs |
debug-diagnostics |
|
Retrieves the name of this generic parameter.
int GetNameOfFormalParam (
string pbstrName
);
HRESULT GetNameOfFormalParam (
BSTR* pbstrName
);
pbstrName
[out] Name of this generic parameter.
If successful, returns S_OK
; otherwise, returns an error code.
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;
}