I’ve lost track of the number of times I have had to search for this.
So now its going in a post.
From here:
Data type |
Pass by value |
Pass by ref (pointer) |
Comments |
Boolean |
A |
L |
short (0=false or 1=true) |
double |
B |
E |
|
char * |
|
C, F |
Null-terminated ASCII byte string. |
unsigned char * |
|
D, G |
Length -counted ASCII byte string. |
unsigned short *
(starting in Excel 2007) |
|
C%, F% |
Null-terminated Unicode wide character string. |
unsigned short *
(starting in Excel 2007) |
|
D%, G% |
Length-counted Unicode wide character string. |
unsigned short [int] |
H |
|
WORD |
[signed] short [int] |
I |
M |
16-bit |
[signed long] int |
J |
N |
32-bit |
Array |
|
O |
Passed as three arguments by reference:
- short int *rows
- short int *columns
- double *array
|
Array
(starting in Excel 2007) |
|
O% |
Passed as three arguments by reference:
- int *rows
- int *columns
- double *array
|
FP |
|
K |
Floating-point array structure. |
FP12
(starting in Excel 2007) |
|
K% |
Large grid floating-point array structure. |
XLOPER |
|
P |
Variable-type worksheet values and arrays. |
|
|
R |
Values, arrays, and range references. |
XLOPER12
(starting in Excel 2007) |
|
Q |
Variable-type worksheet values and arrays. |
|
|
U |
Values, arrays, and range references. |
The types C%, F%, D%, G%, K%, O%, Q, and U were all new in Microsoft Office Excel 2007 and are not supported in earlier versions. The string types F, F%, G, and G% are used for arguments that are modified-in-place. When XLOPER or XLOPER12 arguments are registered as types P or Q respectively, Excel converts single-cell references to simple values and multi-cell references to arrays when it prepares them.
P and Q types always arrive in your function as one of the following types: xltypeNum, xltypeStr, xltypeBool, xltypeErr, xltypeMulti, xltypeMissing, or xltypeNil, but not xltypeRef or xltypeSRef because these are always dereferenced.
Type O, which is really three arguments on the stack, was introduced for compatibility with Fortran DLLs where arguments are passed by reference. It cannot be used to return a value except by declaring the argument as a modify-in-place return value and placing the results in the referenced values. Type O% extends type O in Excel 2007 so that it can access arrays that cover areas larger than the Office Excel 2003 grid.
So lets hope I can remember the search term eh?
cheers
Simon
You must be logged in to post a comment.