Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes the CComVariant object and sets the vt member to VT_BYREF.
template< typename T >
void SetByRef(
T* pT
) throw();
Parameters
T
The type of VARIANT, for example, BSTR, int, or char.pT
The pointer used to initialize the CComVariant object.
Remarks
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