Posted: Fri May 30, 2008 9:22 pm
Fred is right, the EnumWindowsProc takes only 2 parameters.
Heres the one that TailBite uses :
Heres the one that TailBite uses :
Code: Select all
Structure FindProcInfo
Terminate.l
ProcessName$
FindText$
NoText$
EndStructure
Procedure EnumWindowsProc(hWnd, *lParam.FindProcInfo)
Protected result.l,*szBuffer,WText$
result = #True
*szBuffer = AllocateMemory(1024)
GetWindowText_(hWnd, *szBuffer, 1024)
WText$ = PeekS(*szBuffer)
FreeMemory(*szBuffer)
If Left(WText$, Len(*lParam\FindText$))=*lParam\FindText$
If WText$<>*lParam\NoText$
hIDE = hWnd
GetProcessListResult$ = Right(WText$, Len(WText$)-Len(*lParam\FindText$))
result = #False
EndIf
EndIf
ProcedureReturn result
EndProcedure