Windows – Does RTLCopyMemory work in Vista

comvb6winapiwindows-vista

I've noticed that RTLMoveMemory seems to work just fine. But when I try to use RTLCopyMemory I get: "Can't find DLL entry point RtlCopyMemory in kernel32". Here is my declare:

Private Declare Sub CopyMem Lib "kernel32" Alias "RtlCopyMemory" ( _
    ByVal dest As Long, _
    ByVal source As Long, _
    ByVal bytLen As Long)

Best Answer

RtlCopyMemory is provided inline. It is defined in winnt.h as memcpy. This means that it's not included in a Win32 DLL, it's part of the C runtime library. You could try importing memcpy from c:\windows\system32\msvcrt.dll.

Related Topic