CComSafeArray::Attach

Attaches a SAFEARRAY structure to a CComSafeArray object.

HRESULT Attach(
   const SAFEARRAY * psaSrc 
);

Parameters

  • psaSrc
    A pointer to the SAFEARRAY structure.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

Attaches a SAFEARRAY structure to a CComSafeArray object, making the existing CComSafeArray methods available.

Smart Device Developer Notes

CComSafeArray::Attach( SAFEARRAY * ) is supported for only VT_BSTR, VT_VARIANT, VT_UNKNOWN, and VT_DISPATCH VARTYPEs.

Requirements

Header: atlsafe.h

See Also

Concepts

CComSafeArray Class

CComSafeArray Members

CComSafeArray::Detach