Preface
This manual contains descriptions of each function and subroutine available in the f90VB libraries. f90VB contains four distinct libraries; f90VBBStrings, f90VBSafeArrays, f90VBVariants and f90VBAutomation. Consequently, this manual is also broken into four chapters, each one describing the procedures available in a single f90VB library.
The description of each procedure in f90VB contains several sections as shown in the figure below.

The header section contains the name of the procedure. In some cases, we have grouped several procedures into a single reference, either because they share the same arguments or because they are functionally equivalent. With one exception, the names of all the procedures that have been grouped together in a single description are listed in the header section. An exception to this rule was made for the description of the low-level procedures that convert variant types. This is a very large set of procedures, all of which share similar names and arguments. In this case, we grouped the procedures by the target type to which a passed argument will be converted and the header has the notation:
VariantTargetTypeFrom<VarType>
Where TargetType is the target type for the coercion. So the header for the description of all low-level procedures that coerce data into double real values appears as:
VariantR8From<VarType>
<VarType> is used to indicate that several procedures are included in this description, the name of each procedure has a suffix given by the source type of the data to be coerced into a double precision real. So the description under header VariantR8From<VarType> includes the following procedures:
VariantR8FromUI1, VariantR8FromI1, VariantR8FromUI2, VariantR8FromUI2, VariantR8FromI4, VariantR8FromUI4, etc.
The full syntax and arguments to each of the procedures included in this group is described in the section labeled Syntax.
The second section of the description of a procedure is labeled f90VB Modules. It contains a list of the f90VB modules that must be included (USEd) in your application to use these procedures. Module f90VBDefs must be included in all your applications that use f90VB, because it contains important definitions of constants and data types.
The section labeled Summary contains a short description of the operation(s) performed by the described procedure(s). In most cases this description is augmented in the section labeled Comments, which usually also contains additional information about valid procedure arguments, as well as other generalities and exceptions that apply to the procedure.
The section labeled Syntax contains what could be considered the equivalent to a Fortran interface block for the procedure. This is the section that defines the name of the procedure, as it should be called from your Fortran applications, as well as the types of the arguments to the procedure. Many f90VB procedures are overloaded to accept different types of arguments, so the syntax convention used in this manual is slightly more complex than a standard Fortran interface. The following example, taken directly from the manual, will be used to described the elements used in the syntax section:
Syntax Variation 1:
| type(VARIANT) function VariantCreate | (iRet) |
| integer(HRESULT_KIND),intent(out),optional:: | iRet |
Syntax Variation 2:
| type(VARIANT) function VariantCreate | (vtType, InitValue, iRet, InitValueType, lcid, flags) |
| integer(VARTYPE_KIND),intent(in):: | vtType |
| { | |
| logical,intent(in):: | InitValue | |
| integer(BYTE_KIND),intent(in):: | InitValue | |
| integer(SHORT_KIND),intent(in):: | InitValue | |
| integer(LONG_KIND),intent(in):: | InitValue | |
| real(FLOAT_KIND),intent(in):: | InitValue | |
| real(DOUBLE_KIND),intent(in):: | InitValue | |
| type(CURRENCY),intent(in):: | InitValue | |
| type(DECIMAL),intent(in):: | InitValue | |
| character(len=*),intent(in):: | InitValue | |
| type(FSafeArray),intent(in):: | InitValue | |
| integer(SAFEARRAY_KIND),intent(in):: | InitValue | |
| integer(BSTRHNDL_KIND),intent(in):: | InitValue | |
| integer(OLECHAR_KIND),dimension(:),intent(in):: | InitValue | |
| type(OLESTRING),intent(in):: | InitValue | |
| } | |
| integer(HRESULT_KIND),intent(out),optional:: | iRet |
| integer(VARTYPE_KIND),intent(in),optional:: | InitValueType |
| integer(LCID_KIND),intent(in),optional:: | lcid |
| integer(WORD_KIND),intent(in),optional:: | flags |
This example describes function VariantCreate. The function returns a variant value. It can be called with two syntax variations. The first variation has a single argument (iRet), which is optional. The second variation of VariantCreate can be called with up to six arguments. The first two arguments (vtType and InitValue) must be present. The rest of the arguments are optional. Argument InitValue can be any of several types. All of the allowed types are enclosed between brackets. The symbol | is used to reinforce the concept that only one InitValue argument can be present, and that it must be of one of the types listed between the two brackets.
The fifth section of a procedure description is labeled Arguments. This section briefly indicates the meaning of each of the possible arguments of the described function or subroutine. It also indicates the direction of the argument (i.e. in, out or inout), and whether the argument is optional or not. In many cases you will see that the short description of arguments refers the reader to the Comments sections, in which more details regarding the argument may be given.
Many procedure descriptions include a section labeled Example, in which an example of how to use the described procedure is given. In some cases, however, this section refers the reader to an example provided for another procedure.
The final section of a procedure description is called Related Topics. It lists other f90VB procedures that may be of interest or have some type of relationship to the procedure being described.