VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



assign array

by Cuong C. To (2 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 9th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

assign array

API Declarations


Using API function 'CopyMemory' to assign array to another array.


Rate assign array




Dim sour(1 To 100) As Long, dest(1 To 100) As Long, x(1 To 50) As Long, Length as long

' copy whole array sour to dest
Length=100*4 
Call CopyMemory(dest(1), sour(1), Length)
' copy elements from sour(50) to sour(99) to array x
Length=50*4 
Call CopyMemory(x(1), sour(50), length)


Download this snippet    Add to My Saved Code

assign array Comments

No comments have been posted about assign array. Why not be the first to post a comment about assign array.

Post your comment

Subject:
Message:
0/1000 characters