Поделиться через


COleDispatchDriver::GetProperty

Gets the object property specified by dwDispID.

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

Параметры

  • 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.

Пример

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

Требования

Header: afxdisp.h

См. также

Основные понятия

COleDispatchDriver Class

COleDispatchDriver Members

Hierarchy Chart

COleDispatchDriver::InvokeHelper

COleDispatchDriver::SetProperty