Results 1 to 3 of 3

Thread: Anyone ever heard of rtlMoveMemory?

  1. #1

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Question

    I read that this function can copy memory from one place to another. Anyone have a prototype?
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    goto the one you posted in the General VB section
    i found it
    NXSupport - Your one-stop source for computer help

  3. #3
    Member
    Join Date
    Feb 2001
    Location
    Kerala, India
    Posts
    42

    Talking Lets Try

    Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
    Private Declare Function GetTickCount Lib "kernel32" () As Long
    Private Sub Form_Load()
    Dim sSave As String, Cnt As Long, T As Long, Pos As Long, Length As Long
    Const mStr = "Hello "
    Length = Len(mStr)
    sSave = Space(5000 * Length) 'make buffer for justified comparison
    'Get the current tickcount
    T = GetTickCount
    Pos = 1
    sSave = Space(5000 * Length)
    For Cnt = 1 To 5000
    Mid(sSave, Pos, Length) = mStr
    Pos = Pos + Length
    Next Cnt
    'Show the results
    MsgBox "It took Visual basic" + Str$(GetTickCount - T) + " msecs. to add 5000 times a string to itself."
    'Get the current tickcount
    T = GetTickCount
    Pos = 0
    sSave = Space(5000 * Length)
    For Cnt = 1 To 5000
    CopyMemory ByVal StrPtr(sSave) + Pos, ByVal StrPtr(mStr), LenB(mStr)
    Pos = Pos + LenB(mStr)
    Next Cnt
    'Show the results
    MsgBox "It took CopyMemory" + Str$(GetTickCount - T) + " msecs. to add 5000 times a string to itself."
    End Sub
    GetHelp <-> LetHelp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width