Help Center

CDispInvoke.SetRefmethod

Assigns a value to an interface member property that contains a reference to an object.

COMmethodCDispInvoke.incdocumented

Syntax

FUNCTION SetRef (BYVAL dispID AS DISPID, BYREF dvArg AS DVARIANT) AS HRESULT
FUNCTION SetRef (BYVAL dispID AS DISPID, BYREF dvArg1 ... dvArg2 AS DVARIANT) AS HRESULT
FUNCTION SetRef (BYVAL dispID AS DISPID, BYREF dvArg1 ... dvArg3 AS DVARIANT) AS HRESULT
FUNCTION SetRef (BYVAL pwszName AS WSTRING PTR, BYREF dvArg AS DVARIANT) AS HRESULT
FUNCTION SetRef (BYVAL pwszName AS WSTRING PTR, BYREF dvArg1 ... dvArg2 AS DVARIANT) AS HRESULT
FUNCTION SetRef (BYVAL pwszName AS WSTRING PTR, BYREF dvArg1 ... dvArg3 AS DVARIANT) AS HRESULT

Parameters

NameDescription
dispIDIdentifies the member. Use GetIDsOfNames or the object's documentation to obtain the dispatch identifier.
pwszNameThe name of the property to call.
dvArg1...dvArg3DVARIANT. The last parameter is the value to set. dvArg1 and dvArg2 are the index values.

Return value

S_OK (0) on success or an HRESULT code.

Description

Assigns a value to an interface member property that contains a reference to an object. For example, a reference to another interface.

Reference

  • Include file CDispInvoke.inc
  • Defined in AfxNova/CDispInvoke.inc:974
  • Documented in COM/CDispInvoke Class.md
  • Topic: CDispInvoke Class