Here is a quick example :
include EnumWnd.inc
.data
f1 db '%s',13,10,0
.data?
buffer db 128 dup(?)
buffer2 db 128 dup(?)
.code
start:
invoke EnumWindows,ADDR EnumWndProc,0
invoke ExitProcess,0
EnumWndProc PROC hwnd:DWORD,lParam:DWORD
invoke GetWindowText,hwnd,ADDR buffer,64
invoke wsprintf,ADDR buffer2,ADDR f1,ADDR buffer
invoke StdOut,ADDR buffer2
mov eax,1
ret
EnumWndProc ENDP
END start
Empty lines should avoid too.
Also wsprintf give count of chrs to print text, so it can be used too.
WriteFile / WriteConsole works well with wsprintf.
Hi Timo,
Thanks, I will take care of it.