Function Reference


_CreateSafeArrayBounds

Creates a SAFEARRAYBOUND structure for a SafeArray, supporting up to 5 dimensions.

_CreateSafeArrayBounds($iElements1 [, $iLBound1 = 0 [, $iElements2 = 0 [, $iLBound2 = 0 [, ...]]]])

Parameters

$iElements1 Number of elements for the first dimension (required).
$iLBound1 (Optional) Lower bound for the first dimension (default: 0).
$iElements2 (Optional) Number of elements for the second dimension (default: 0).
$iLBound2 (Optional) Lower bound for the second dimension (default: 0).
$iElements3 (Optional) Number of elements for the third dimension (default: 0).
$iLBound3 (Optional) Lower bound for the third dimension (default: 0).
$iElements4 (Optional) Number of elements for the fourth dimension (default: 0).
$iLBound4 (Optional) Lower bound for the fourth dimension (default: 0).
$iElements5 (Optional) Number of elements for the fifth dimension (default: 0).
$iLBound5 (Optional) Lower bound for the fifth dimension (default: 0).

Return Value

Success: Pointer to the SAFEARRAYBOUND structure.
Failure: 0 and sets @error:
1 - Too many dimensions (> 5).
2 - Invalid number of elements (<= 0 for a specified dimension).
3 - Failed to create the structure.

Remarks

The structure is created based on non-zero $iElements parameters.