Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnumWindows() throws an exception if the callback returns False #2163

Open
sn260591 opened this issue Dec 31, 2023 · 0 comments
Open

EnumWindows() throws an exception if the callback returns False #2163

sn260591 opened this issue Dec 31, 2023 · 0 comments

Comments

@sn260591
Copy link

  • Expected behavior
    No exceptions.

  • Actual behavior
    Throwing an exception pywintypes.error: (126, 'EnumWindows', 'The specified module could not be found.')

  • Steps to reproduce the problem
    Run this code:

import win32gui

def enum_windows_proc(hwnd, extra):
    print(hwnd)
    return False

win32gui.EnumWindows(enum_windows_proc, None)
  • Version of Python and pywin32
    Python 3.11.7, pywin32 306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant