SafeArrayDestroyData Function

Destroys all the data in a safe array.

HRESULT SafeArrayDestroyData(  
  SAFEARRAY *  psa  
);

psa

Pointer to an array descriptor.

The return value obtained from the returned HRESULT is one of the following.

Value

Meaning

S_OK

Success.

DISP_E_ARRAYISLOCKED

The array is currently locked.

E_INVALIDARG

The item pointed to by psa is not a safe array descriptor.

This function is typically used when freeing safe arrays that contain elements with data types other than variants. If objects are stored in the array, Release is called on each object in the array. Safe arrays of variant will have VariantClear Function called on each member and safe arrays of BSTR will have SysFreeString Function called on each element. IRecordInfo::RecordClear Function will be called to release object references and other values of a record without deallocating the record.

Show:
© 2014 Microsoft