检索此泛型参数索引。
HRESULT GetIndex(
DWORD* pIndex
);
int GetIndex(
out uint pIndex
);
参数
- pIndex
[out] 此泛型参数的索引值。
返回值
如果成功,则返回; S_OK否则,返回错误代码。
备注
例如,对于字典 (K, Hyper-v), K 是索引 0, V 是索引 1。
示例
下面的示例演示如何执行显示 IDebugGenericParamField 接口的 CDebugGenericParamFieldType 对象的方法。
HRESULT CDebugGenericParamFieldType::GetIndex(DWORD* pIndex)
{
HRESULT hr = S_OK;
METHOD_ENTRY( CDebugGenericParamFieldType::GetIndex );
IfFalseGo(pIndex, E_INVALIDARG );
IfFailGo( this->LoadProps() );
*pIndex = m_index;
Error:
METHOD_EXIT( CDebugGenericParamFieldType::GetIndex, hr );
return hr;
}