SafeArrayDestroyDescriptor
f90VB Modules
f90VBDefs, f90VBSafeArrays
Summary
Destroys an existing Safe Array descriptor. To destroy the corresponding Safe Array data, you must first call DestroySafeArrayData.
Syntax
| subroutine SafeArrayDestroyDescriptor | (SARef, iRet) |
| { | |
| integer(SAFEARRAY_KIND),intent(inout):: | SARef | |
| type(FSafeArray),intent(inout):: | SARef | |
| } | |
| integer(HRESULT_KIND),intent(out),optional:: | iRet |
Arguments
SARef [Input/Output]
The handle or Fortran Safe Array structure containing a handle to the Safe Array descriptor to be destroyed. If the subroutine is successful, the handle is set to null upon return.
iRet [Output, Optional]
Upon return, iRet contains S_OK or an error code. See comments for more information.
Comments
Note that SafeArrayDestroyDescriptor only deallocates the array descriptor, it does not destroy the data associated to the array. To destroy the data, you must call SafeArrayDestroyData before calling SafeArrayDestroyDescriptor.
If you want to release the data and the descriptor associated with an array, calling SafeArrayDestroy would perform this in a single operation. SafeArrayDestroyDescriptor is typically used to destroy the descriptor of a Safe Array that contains elements with data types other than variants.
Argument iRet
Indicates success or failure of the subroutine. The following codes can be returned in this argument:
| Value returned in argument iRet | Description | |
| S_OK | Success. | |
| DISP_E_ARRAYISLOCKED | The array is currently locked. | |
| E_INVALIDARG | The item pointed to by SARef is not a Safe Array descriptor | |
Related Topics
| For information about | See | |
| Destroying a Safe Array | SafeArrayDestroy | |
| Destroying the Safe Array Data | SafeArrayDestroyData | |
| Allocating a Safe Array descriptor | SafeArrayAllocDescriptor | |
| Allocating Safe Array data | SafeArrayAllocData | |