;============================================================================================================================================= ; Step_1.asm ;This program is an asm representation of the first step of WinApi FirstSteps' Course ;(C)I don't take any responsibility for the use of this program ; Zedr0n -- connection closed ;============================================================================================================================================= ;============================================================================================================================================= ; Options/Declarations ;============================================================================================================================================= .386 .model flat, stdcall option casemap:none include windows.inc include kernel32.inc include user32.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\user32.lib ;============================================================================================================================================= ; Data segment ;============================================================================================================================================= .data Sign db "Zedr0n's step 1",0 ;============================================================================================================================================ ; Variables segment ;============================================================================================================================================ .data? hWnd HWND ? info LPSTR ? ;============================================================================================================================================= ; Code segment ;============================================================================================================================================= .code start: invoke GetDesktopWindow mov hWnd,eax invoke GetWindow,hWnd,GW_CHILD mov hWnd,eax .while hWnd!=0 invoke GetWindow,hWnd,GW_HWNDNEXT mov hWnd,eax invoke GetWindowText,hWnd,offset info,100 invoke lstrlen,offset info .if eax!=0 invoke MessageBox,NULL,offset info,offset Sign,MB_OK .endif .endw invoke ExitProcess,NULL end start