다음을 통해 공유


COleSafeArray::Detach

Detaches the VARIANT data from the COleSafeArray object.

VARIANT Detach( );

Return Value

The underlying VARIANT value in the COleSafeArray object.

Remarks

The function detaches the data in a safe array by setting the VARTYPE of the object to VT_EMPTY. It is the caller's responsibility to free the array by calling the Windows function VariantClear.

On error, the function throws a COleException.

Example

See the example for COleSafeArray::PutElement.

Requirements

Header: afxdisp.h

See Also

Reference

COleSafeArray Class

Hierarchy Chart

COleSafeArray::Attach

VariantClear Function

Other Resources

COleSafeArray Members