System.VarUtils.SafeArrayDestroy

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function SafeArrayDestroy; external oleaut name 'SafeArrayDestroy';

C++

extern "C" HRESULT __stdcall SafeArrayDestroy(System::PVarArray VarArray);

Properties

Type Visibility Source Unit Parent
function external public
System.VarUtils.pas
System.VarUtils.hpp
System.VarUtils System.VarUtils

Description

Destroys a safe array.

Use SafeArrayDestroy to destroy safe array given through VarArray.

SafeArrayDestroy first checks whether the given safe array is locked or nil. If this is the case, then SafeArrayDestroy returns VAR_ARRAYISLOCKED or VAR_INVALIDARG, correspondingly.

If the safe array is valid, then SafeArrayDestroy removes the actual data from memory using a call to SafeArrayDestroyData and also destroys the associated safe array descriptor with a call to SafeArrayDestroyDescriptor. If SafeArrayDestroy manages to destroy the safe array, it returns a VAR_OK result.

See Also

Code Examples