contents   index   previous   next



SafeArrayGetVarType

 

(SafeArrayVarType)

 

f90VB Modules

 

f90VBDefs, f90VBSafeArrays

Summary

 

Returns the VT-Type of the elements of a Safe Array.

 

SafeArrayGetVarType is a subroutine. It returns the VT-Type of the array’s elements in argument vtType. SafeArrayVarType is a function whose return value is the VT-Type of the elements in the passed Safe Array.

Syntax

 

Syntax Variation 1:

 

integer(SHORT_KIND) function SafeArrayVarType (SARef, iRet)

Syntax Variation 2:

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

 

subroutine SafeArrayGetVarType (SARef, vtType, iRet)

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

Arguments

 

SARef [Input]

A handle to, or a Fortran Safe Array structure containing a handle to, an allocated Safe Array descriptor.

 

vtType [Output]

Variable where the VT-Type of the array’s elements is to be returned. If you are using Syntax Variation 1, VT-Type of the array’s elements is returned as the result of function SafeArrayVarType.

 

iRet [Output, Optional]

Upon return, iRet contains S_OK or an error code. See comments for more information.

Comments

 

Note that SARef must be a reference to an allocated Safe Array descriptor.

 

If an error condition occurs or the VT-Type of an array cannot be determined, the return value of function SafeArrayVarType is VT_ILLEGAL.

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.
E_INVALIDARG The item pointed to by SARef is not a Safe Array descriptor

Examples

 

See example for SafeArrayGetDim.

Related Topics

 

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

 


SafeArrayLock