contents   index   previous   next



SafeArrayDestroyData

 

f90VB Modules

 

f90VBDefs, f90VBSafeArrays

Summary

 

Destroys the data associated to an existing Safe Array.

Syntax

 

subroutine SafeArrayDestroyData (SARef, iRet)

{
integer(SAFEARRAY_KIND),intent(in):: SARef |
type(FSafeArray),intent(inout):: SARef |
}
integer(HRESULT_KIND),intent(out),optional:: iRet

Arguments

 

SARef [Input/Output]

A handle to, or Fortran Safe Array structure containing a handle to, the Safe Array descriptor. 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 SafeArrayDestroyData only deallocates the data associated to an array descriptor, it does not destroy the descriptor.

 

This subroutine is typically used in conjunction with SafeArrayDestroyDescriptor to free Safe Arrays that contain elements with data types other than variants. If objects are stored in the array, SafeArrayDestroyData calls Release on each object in the array. Safe Arrays of variant will have VariantClear called on each member and Safe Arrays of BStrings will have the BStrings released.

 

If you want to release the data and the descriptor associated to an array, calling SafeArrayDestroy would perform this in a single operation.

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 descriptor SafeArrayDestroyDescriptor
Allocating a Safe Array descriptor SafeArrayAllocDescriptor
Allocating Safe Array data SafeArrayAllocData

 


SafeArrayDestroyDescriptor