Skip to content

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

@sn260591

Description

@sn260591
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions