469,934 Members | 2,092 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

Using Marshal to create an unmanaged UInt32 array

If I want to move a signed integer array to unmanaged memory I can use
the following code:

Dim myArray() As Integer
Dim myPtr As IntPtr

myPtr = Marshal.AllocHGlobal(Marshal.SizeOf(GetType(Intege r)) *
myArray.Length)
Marshal.Copy(myArray, 0, myPtr, myArray.Length)

However I cannot use Marshal.Copy for an array of UInt32

How can I achieve this? (OpenGL doesnae like signed buffer
indices ;) )

Many thanks,

G
Oct 27 '08 #1
0 1271

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Sushi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.