SafeArrayDestroyDescriptor

HRESULT SafeArrayDestroyDescriptor( 
  SAFEARRAY FAR*  psa  
);
 

Destroys a descriptor of a safe array.

Parameter

psa
Pointer to a safe array descriptor.

Return Value

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

Return 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.

Comments

This function is typically used to destroy the descriptor of a safe array that contains elements with data types other than variants. Destroying the array descriptor does not destroy the elements in the array. Before destroying the array descriptor, call SafeArrayDestroyData to free the elements.

QuickInfo

  Windows NT: Use version 3.1 and later.
  Windows: Use Windows 95 and later.
  Header: Declared in oleauto.h.
  Import Library: Link with oleaut32.lib.

See Also

SafeArrayAllocData, SafeArrayAllocDescriptor, SafeArrayDestroyData