i cant use CopyMemory function,
ML.EXE tell me CopyMemory is undefined simbol,
RtlCopyMemory ,too
how can i use it ?
ML.EXE tell me CopyMemory is undefined simbol,
RtlCopyMemory ,too
how can i use it ?
i also had this problem,
i used rtlMoveMemory.
Also made a copymemory routine by myself.
bye
i used rtlMoveMemory.
Also made a copymemory routine by myself.
bye
Hehe, nice... in my win32api.inc file for powerbasic, CopyMemory is declared as follows:
And in VB it's:
You see, both time it uses RtlMoveMemory :)
P.S.: You should use a custom copymemory proc, because the API's are so sloooow...
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...
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
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
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.
with a simple dword loop over eax.
The kernel32 function is about 2 times faster :(
Maybe windows uses a MMX optimization if present.
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
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