Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CComVariant::SetByRef

 

Initializes the CComVariant object and sets the vt member to VT_BYREF.


      template< typename 
      T
       >
void SetByRef(
   T* pT 
) throw();

T

The type of VARIANT, for example, BSTR, int, or char.

pT

The pointer used to initialize the CComVariant object.

SetByRef is a function template that initializes the CComVariant object to the pointer pT and sets the vt member to VT_BYREF. For example:

CComVariant var;
int nData = 10;
var.SetByRef(&nData);   

Requirements

Header: atlcomcli.h

Show: