I am sure this is wrong... am I doing this correctly and the problem is something else or it's just that I am doing this wrong?
Rem Project: Execute&Close
Rem Created: 1/11/2008 6:59:51 PM
Rem ***** Main Source File *****
LOAD DLL "user32.dll",1
EXECUTE FILE "notepad.exe", "",""
DO
IF DLL EXIST (1)=0
TEXT 10,10, "DLL NOT FOUND"
ENDIF
IF DLL CALL EXIST (1, "FindWindowA")=0
TEXT 10,30, "FUNCTION CALL NOT FOUND"
ENDIF
program$="Notepad"
result=CALL DLL (1, "FindWindowA", program$)
IF result=1
END
ELSE
TEXT 10,50, "hWnd: "+str$(result)
ENDIF
LOOP