This function destroys all the data in a safe array.
At a Glance
Header file: | Oleauto.h |
Windows CE versions: | 2.0 and later |
Syntax
HRESULT SafeArrayDestroyData( SAFEARRAY FAR * psa);
Parameters
psa
Pointer to an array descriptor.
Return Values
One of the values obtained from the returned HRESULT and described in the following table is returned.
Value | Description |
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. |
Remarks
Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application.
Remarks
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.
See Also
SafeArrayAllocData, SafeArrayAllocDescriptor, SafeArrayDestroyDescriptor