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')
what i include 'inc' file to use ZeroMemory() .. ?
i cant find any inc files defined this function ..
(in VC++, ZeroMemory defined at 'winbase.h')
newbie,
RtlZeroMemory PROTO :DWORD,:DWORD
is in kernel32.inc, this is the same function that you are after, its just named slightly differently.
Regards,
hutch@pbq.com.au
RtlZeroMemory PROTO :DWORD,:DWORD
is in kernel32.inc, this is the same function that you are after, its just named slightly differently.
Regards,
hutch@pbq.com.au
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:
i know its not fast or optimal...just a starting point
as you improve try to make it use dword writes instead of bytes...
RtlZeroMemory (aka ZeroMemory from winbase.h) is so slooowww :D
a starting framework will be:
.data
where_to_zero dd offset my_target
how_many_bytes dd 1024 ; just for example
.code
; the mighty code ;)
;----------------------------
My_Zero_Memory:
; 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
;------------------------
ret
i know its not fast or optimal...just a starting point
as you improve try to make it use dword writes instead of bytes...
Thank you ~!