|
-
Mar 20th, 2006, 10:32 PM
#1
Thread Starter
Fanatic Member
[Resolved] CopyMemory to copy data from 1D to 2D array
Is there some clever way to use CopyMemory to fill a 2D array from a 1D array? I suspect there isn't, but thought I'd ask. Certainly the tried and true nested loop will do it - was just looking for a more compact way to do it.
VB Code:
Dim bArray2(0 to 31, 0 to 16) as byte
Dim bArray1(0 to 511) as byte
CopyMemory ??, bArray1(0), 512&
Last edited by VBAhack; Mar 21st, 2006 at 01:59 PM.
-
Mar 21st, 2006, 12:44 PM
#2
Re: CopyMemory to copy data from 1D to 2D array
VB Code:
CopyMemory bArray2(0,0), bArray1(0), 512&
-
Mar 21st, 2006, 02:01 PM
#3
Thread Starter
Fanatic Member
Re: [Resolved] CopyMemory to copy data from 1D to 2D array
Looks obvious now that I see it. Works great, thanks!
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
|