Export (0) Print
Expand All

ITypeInfo::GetFuncDesc

Retrieves the FUNCDESC Structure structure that contains information about a specified function.

HRESULT GetFuncDesc(
  unsigned int  index,
  FUNCDESC FAR* FAR  *ppFuncDesc
);

index

Index of the function whose description is to be returned. The index should be in the range of 0 to 1 less than the number of functions in this type.

ppFuncDesc

On return, points to a pointer to a FUNCDESC Structure that describes the specified function.

The return value obtained from the returned HRESULT is one of the following:

Return value

Meaning

S_OK

Success.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

One or more of the arguments is invalid.

The function ITypeInfo::GetFuncDesc provides access to a FUNCDESC Structure structure that describes the function with the specified index. The FUNCDESC Structure should be freed with ITypeInfo::ReleaseFuncDesc. The number of functions in the type is one of the attributes contained in the TYPEATTR Structure structure.

In the following example, the CHECKRESULT function is undefined. Replace this function with your error handling code.

CHECKRESULT(ptypeinfo->GetFuncDesc(i, &pfuncdesc));
idMember = pfuncdesc->memid;
CHECKRESULT(ptypeinfo->GetDocumentation(idMember, &bstrName, NULL, NULL, NULL));
ptypeinfo->ReleaseFuncDesc(pfuncdesc);
Show:
© 2015 Microsoft