How do I pass a variable length array of short values to an API call? I have triedbut it generates a loadlibrary exception...VB Code:
<MarshalAs(UnmanagedTypes.LPArray)>pFields() As Short
Any ideas?
Thanks in advance,
Duncan
Printable View
How do I pass a variable length array of short values to an API call? I have triedbut it generates a loadlibrary exception...VB Code:
<MarshalAs(UnmanagedTypes.LPArray)>pFields() As Short
Any ideas?
Thanks in advance,
Duncan
Have you tried using a fixed length array?
/LeyanCode:<MarshalAs(UnmanagedType.LPArray, SizeConst=10)>pFields() As Short
Unfortunately the array is variable length at run time....
ok, but just to see the result, is it possible for you to test if it works with a fixed length array?
Some situation requires a fixed length array, that would help us see if that might be the case for you.
/Leyan