I'm not sure win32gui.EnumWindows is working properly
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Luau
--
Chapters
00:00 Question
01:36 Accepted answer (Score 2)
02:14 Thank you
--
Full question
https://stackoverflow.com/questions/2968...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #pywin32
#avk47
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Luau
--
Chapters
00:00 Question
01:36 Accepted answer (Score 2)
02:14 Thank you
--
Full question
https://stackoverflow.com/questions/2968...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #pywin32
#avk47
ACCEPTED ANSWER
Score 2
I think that EnumWindows is doing exactly what its documentation says it will do. Returning False from the callback function terminates the enumeration. Your statement "the wrapper can only sees the return value" means nothing, since according to the documentation this function isn't supposed to return anything. Why don't you forget about analyzing the return value and just wrap the call to EnumWindows in a try: except: block if you want to suppress the exception.