Condividi tramite


COleDispatchDriver::GetProperty

Gets the object property specified by dwDispID.

void GetProperty(
   DISPID dwDispID,
   VARTYPE vtProp,
   void* pvProp 
) const;

Parameters

  • dwDispID
    Identifies the property to be retrieved.

  • vtProp
    Specifies the property to be retrieved. For possible values, see the Remarks section for COleDispatchDriver::InvokeHelper.

  • pvProp
    Address of the variable that will receive the property value. It must match the type specified by vtProp.

Example

CString IMyComObject::GetString(DISPID dispid)
{
    CString result;
    GetProperty(dispid, VT_BSTR, (void*)&result);
    return result;
}

Requirements

Header: afxdisp.h

See Also

Reference

COleDispatchDriver Class

Hierarchy Chart

COleDispatchDriver::InvokeHelper

COleDispatchDriver::SetProperty

Other Resources

COleDispatchDriver Members