Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Uses the CopyMemory API function to copy a block o...
Author:
Chris Beckman
Submitted:
3/10/2000
Version:
VB6
Compatibility:
VB6
Category:
Windows API
Views:
22729
Uses the CopyMemory API function to copy a block of memory byte by byte from one memory address to another.
Declarations:
Private Declare Sub CopyMemory Lib "kernel32" Alias _ "RTlMoveMemory" (lpDest As Any, lpSource AS Any, _ ByVal cbCopy As Long)
Code:
Dim varlng As Long Dim Y As Integer Dim DestArray(1 To 4) As Byte ' set varlng varlng = &H12345678 'use CopyMemory API to copy varlng to DestArray byte by byte CopyMemory DestArray(1), varlng, 4 'The argument "4" represents the number of bytes to copy.
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement