ITypeInfo::GetVarDesc method

Retrieves a VARDESC structure that describes the specified variable.

Syntax


HRESULT GetVarDesc(
  [in]   UINT index,
  [out]  VARDESC **ppVarDesc
);

Parameters

index [in]

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

ppVarDesc [out]

A VARDESC that describes the specified variable.

Return value

This method can return one of these values.

Return codeDescription
S_OK

Success.

E_INVALIDARG

One or more of the arguments is not valid.

E_OUTOFMEMORY

Insufficient memory to complete the operation.

 

Remarks

To free the VARDESC structure, use ReleaseVarDesc.

Examples

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


CHECKRESULT(ptypeinfo->GetVarDesc(i, &pvardesc));
idMember = pvardesc->memid;
CHECKRESULT(ptypeinfo->GetDocumentation(idMember, &bstrName, NULL, NULL, 
      NULL));
ptypeinfo->ReleaseVarDesc(pvardesc);


Requirements

IDL

OaIdl.idl

See also

ITypeInfo

 

 

Community Additions

ADD
Show:
© 2014 Microsoft