i cant use CopyMemory function,

ML.EXE tell me CopyMemory is undefined simbol,

RtlCopyMemory ,too

how can i use it ?
Posted on 2001-09-30 20:37:56 by c][obo
i also had this problem,

i used rtlMoveMemory.
Also made a copymemory routine by myself.

bye
Posted on 2001-10-01 00:56:21 by Bit7
Hehe, nice... in my win32api.inc file for powerbasic, CopyMemory is declared as follows:



SUB CopyMemory (BYVAL pDestination AS DWORD, BYVAL pSource AS DWORD, BYVAL cbLength AS LONG)
MoveMemory BYVAL pDestination, BYVAL pSource, cbLength
END SUB


And in VB it's:



Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)


You see, both time it uses RtlMoveMemory :)

P.S.: You should use a custom copymemory proc, because the API's are so sloooow...
Posted on 2001-10-01 02:19:48 by bazik
Hi,

extrn RtlMoveMemory:PROC

push dwSize
push lpDest
push lpSource
call RtlMoveMemory

thats it. Your problem might be your kernel32.lib file. If this is the case try to create it directly from kernel32.dll.

It works and the performance is not as bad some guys might think.

Bye Miracle
Posted on 2001-10-01 04:21:02 by miracle
I'm using a custom copymemory function, which copies
with a simple dword loop over eax.

The kernel32 function is about 2 times faster :(
Maybe windows uses a MMX optimization if present.
Posted on 2001-10-01 04:35:23 by beaster
beaster,

Funny enough a REP MOVSD loop is faster than an indexed DWORD copy using registers. There is a normal one in MASM32 library. To go faster, you will need an MMX version something like the one that Ricky Bower wrote of you machine will handle the SIMD code that he uses in some parts.

Regards,

hutch@pbq.com.au
Posted on 2001-10-01 07:11:34 by hutch--