In the documentation for RegisterCallback() there is this example:
Code: Select all
EnumAddress := RegisterCallback("EnumWindowsProc", "Fast")
DllCall("EnumWindows", Ptr, EnumAddress, Ptr, 0) ; Pass control to EnumWindows(), which calls the callback repeatedly
MsgBox %Output% ; Display the information accumulated by the callback.
Thanks