hello, im newbie .. =)

what i include 'inc' file to use ZeroMemory() .. ?

i cant find any inc files defined this function ..

(in VC++, ZeroMemory defined at 'winbase.h')
Posted on 2001-08-06 19:36:33 by newbie


is in kernel32.inc, this is the same function that you are after, its just named slightly differently.


Posted on 2001-08-06 19:44:14 by hutch--
Besides its not so hard even for a newbie to do its own "ZeroMemory" function...

RtlZeroMemory (aka ZeroMemory from winbase.h) is so slooowww :D

a starting framework will be:

where_to_zero dd offset my_target
how_many_bytes dd 1024 ; just for example


; the mighty code ;)

; first save some registers used
push edi
push ecx

; prepare parameters
mov edi,[where_to_zero]
mov ecx,[how_many_bytes]
mov eax,0 ; what to store is in al=zero for now

; and do it!
rep stosb

; restore the saved registers
pop ecx
pop edi

; return

i know its not fast or optimal...just a starting point
as you improve try to make it use dword writes instead of bytes...
Posted on 2001-08-06 19:58:04 by BogdanOntanu
Thank you ~!
Posted on 2001-08-07 01:11:54 by newbie