Hello
Im creat a lib with tailbit but i have an error from tailbit.
In my code i have a API-fundtion "RtlFillMemory()" and tailbite give me the error "Unknown Windows API function: _RtlFillMemory@12" but wehen i creat a normal procedure in a code in PB with this API function PB have no probs.
Wath is this?
Thx Nico
p.s. sorry for my bad englisch
Taibite error with API function
You can try with FillMemory_() (RtlZeroMemory_() is not supported in Windows 9X/Me).
But, since they're both Windows macros, maybe it doesn't work either (can't test right now). You can use this as a replacement:
Or this:
If your memory size is dword or qword aligned, you can do it faster. I think this should work. Regards,
Code: Select all
; The FillMemory macro fills a block of memory with a specified value.
;
; void FillMemory(
; PVOID Destination,
; SIZE_T Length,
; BYTE Fill
; );
FillMemory_(*Buffer, BufferSize, FillValue) ; <-- Only lower byte is used
Code: Select all
For i=*Buffer To *Buffer+BufferSize
PokeB(i, FillValue.b)
Next i
Code: Select all
push edi
lea edi, *Buffer ; Memory address to fill
mov ecx, BufferSize
shr ecx, 2
mov al, FillValue ; FillValue.b !!!
rep stosb
pop edi
El_Choni

