Hi, can somebody explain me how to use "RtlZeroMemory" ?
Can somebody give me some x-sampels ?

GreetZ
Posted on 2003-03-25 12:04:48 by Forginforcer
buffer db 256 <?>

invoke RtlZeroMemory, ADDR buffer, 256

I do it like that :s
Posted on 2003-03-25 12:14:00 by maCo
What happens while calling the funktion ???

thx
Posted on 2003-03-25 12:15:30 by Forginforcer
it fills the memory with xx 0 bytes starting at yy

invoke RtlZeroMemory, yy, xx
Posted on 2003-03-25 12:17:13 by Hiroshimator
I call it to clear the memory
Posted on 2003-03-25 12:17:35 by maCo
uktra thanks !
Posted on 2003-03-25 12:23:43 by Forginforcer
Is it faster than loop that fills memory with zeros ???
Posted on 2003-03-25 14:28:39 by AceEmbler
everything okay ! TANKS !
Posted on 2003-03-25 14:46:50 by Forginforcer

Is it faster than loop that fills memory with zeros ???


Quick guess: no. It involves a call, and adjusting of stack space. Hence, it's probably somewhat slower. It does however clean up your code to use it, and if it's something you do many times, you either get a lot extra code, or have to code a sub yourself.

Fake
Posted on 2003-03-25 15:02:20 by Fake51
There were efficient zero memory and memory fills algorithms and implementations posted in the board in the past... one can use those for time critical purposes : otherwise RtlZeroMemory is reliable and fast enough for most uses.
Posted on 2003-03-25 16:45:33 by JCP