contents   index   previous   next



SafeArrayDestroy

 

f90VB Modules

 

f90VBDefs, f90VBSafeArrays

Summary

 

Destroys a Safe Array, releasing the memory used by its descriptor and data, and setting the Safe Array’s handle to a null handle.

Syntax

 

subroutine SafeArrayDestroy (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 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

 

Use SafeArrayDestroy to destroy Safe Arrays created with subroutine SafeArrayCreate. If the operation of destroying the Safe Array is successful, subroutine SafeArrayDestroy sets the array handle to null and returns S_OK in iRet.

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

Examples

 

See examples for SafeArrayCreate.

Related Topics

 

For information about See
Creating a Safe Array SafeArrayCreate
Allocating a Safe Array descriptor SafeArrayAllocDescriptor
Allocating Safe Array data SafeArrayAllocData

 


SafeArrayDestroyData