|
-
Nov 24th, 2002, 12:51 PM
#1
Marshal to pass a long pointer to an array of short?
How do I pass a variable length array of short values to an API call? I have tried
VB Code:
<MarshalAs(UnmanagedTypes.LPArray)>pFields() As Short
but it generates a loadlibrary exception...
Any ideas?
Thanks in advance,
Duncan
-
Nov 24th, 2002, 01:14 PM
#2
Registered User
Have you tried using a fixed length array?
Code:
<MarshalAs(UnmanagedType.LPArray, SizeConst=10)>pFields() As Short
/Leyan
-
Nov 25th, 2002, 06:03 AM
#3
Frenzied Member
Unfortunately the array is variable length at run time....
-
Nov 25th, 2002, 06:22 AM
#4
Registered User
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|