Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function destroys a descriptor of a safearray.

Syntax

HRESULT SafeArrayDestroyDescriptor(
  SAFEARRAY FAR* 
psa 
);

Parameters

psa

[in] Pointer to a safearray descriptor.

Return Value

Returns the HRESULT values shown in the following table.

Value Description

S_OK

Success.

DISP_E_ARRAYISLOCKED

The array is locked.

E_INVALIDARG

The item pointed to by psais not a safearray descriptor.

Remarks

Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.

Typically, this function is used to destroy the descriptor of a safearray that contains elements with data types other than variants.

Destroying the array descriptor does not destroy elements in the array.

Before destroying the array descriptor, call SafeArrayDestroyDatato free the elements.

Requirements

Header oleauto.h
Library oleaut32.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also