ITypeInfo::GetVarDesc method (oaidl.h)
Retrieves a VARDESC structure that describes the specified variable.
Syntax
HRESULT GetVarDesc(
[in] UINT index,
[out] VARDESC **ppVarDesc
);
Parameters
[in] index
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.
[out] ppVarDesc
A VARDESC that describes the specified variable.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
One or more of the arguments is not valid. |
|
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
Requirement | Value |
---|---|
Target Platform | Windows |
Header | oaidl.h |