Free VB Download - Free VB Tools - Computer & Technology Articles <data:blog.pageTitle/> <body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener("load", function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=21255525&amp;blogName=Free+VB+Resources+-+Free+VB+Tools%2C+Do...&amp;publishMode=PUBLISH_MODE_BLOGSPOT&amp;navbarType=SILVER&amp;layoutType=CLASSIC&amp;searchRoot=http%3A%2F%2Fconradsharry.blogspot.com%2Fsearch&amp;blogLocale=en_US&amp;homepageUrl=http%3A%2F%2Fconradsharry.blogspot.com%2F" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" allowtransparency="true" title="Blogger Navigation and Search"></iframe> <div></div>

Tips to Copy Large Arrays Faster

You can copy arrays much faster with a simple API call:

Private Declare Sub CopyMemory Lib "kernel32" _
Alias "RtlMoveMemory" (Dest As Any, _
Source As Any, ByVal Length As Long)

Private Sub CopyArray()
Dim lngbytes As Long
Dim lngSrc(1 To 600000) As Long
Dim lngDest(1 To 600000) As Long
'
' Number of bytes equals number of array
' elements times the element length.
'
lngbytes = (UBound(lngSrc) - LBound(lngSrc) + 1) * Len(lngSrc(1))
'
' Copy the array passing the address of the start to
' the destination and source arrays and the length
' of the arrays.
'
Call CopyMemory(lngDest(LBound(lngDest)), lngSrc(LBound(lngSrc)), lngbytes)
End Sub

Labels:




 

3 Comments:

how about resource memory?
CopyMemory copies a series of bytes from one location in the computer's memory to another. CopyMemory function can be used to transfer data between any kinds of variables, arrays, data structures, or even abstract memory addresses, to use arrays, reference the first element of the array. Normally, the 'Dest' and 'Source' parameters are the variables or whatever objects' memory locations to copy to/from. If you want to use either a string variable or have a Long-type variable that identifies a different memory address (i.e., the variable acts as a pointer), the ByVal keyword must be used in front of the parameter.This functions does not return a value.
nice info man:)
» Anonymous Anonymous, 7/02/2008  

Add a comment..

Feeds rssSponsored By



Search

Subscribe feeds via e-mail
-->

Categories

Subscribe feeds rss Recent Entries

Banner links

Advertise Here

Button Badges

Programming Blogs - BlogCatalog Blog Directory Top Computers blogs
On our way to 1,000,000 rss feeds - millionrss.com Subscribe in BlogLines!
feeds2read RSS Directory Blog Directory & Search engine
Computers Blogs - Blog Top Sites Directory of Computers/Tech Blogs hit counters
TopOfBlogs DigNow.net
website tracker Subscribe in NewsGator Online
Computers blog search directory
Free Link Exchange
Increase your back-link numbers and therefore your website's page rank by: 1.Back-links, page rank and keywords ANALYSIS and 2. Back-link rotation exchange rotation system & Google-Bot detection and behavior analysis
Afsyuhud.BlogSpot.com Add to My Yahoo! Add to Google
Get Chitika eMiniMalls
eXTReMe Tracker
Software Blog