COMArray()
This function controls how arrays are passed to COM objects. FoxPro's internal array handling is funky enough, but we have to support even more variations to successfully communicate with COM objects. This function lets us get there.
Usage |
nCurrentType = COMArray( oObject [, nArrayType ] ) |
Parameter |
Value |
Meaning |
oObject |
Object |
A reference to an object whose array-passing behavior you want to query or set. |
nArrayType |
Omitted |
Returns the current setting for passing arrays for this object. |
0 |
Pass a zero-based array by value. |
|
1 |
Pass a one-based array by value. This is the default and the backward-compatible setting. |
|
10 |
Pass a zero-based array by reference. |
|
11 |
Pass a one-based array by reference. |
|
100 |
Pass a fixed-size array that cannot be redimensioned. (Added in VFP 7.) This value can be added to the other values to fix the size of either a zero- or one-based array passed by either value or reference. |
|
nCurrentType |
Integer |
The current (or new) setting. |
Example |
oDear = CreateObject("TestServer.cusServer") ? COMArray(oDear) && Returns the default 1 ? COMArray(oDear,0) && Displays 0 ? COMArray(oDear) && Still displays 0 ? COMArray(oDear,10) && Now it says 10 ? COMArray(oDear,11) && And now 11 |
See Also |