Export (0) Print
Expand All

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.

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

Community Additions

ADD
Show:
© 2014 Microsoft