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

Invalid handle value #123

Closed
mgeisler opened this issue Aug 21, 2012 · 1 comment
Closed

Invalid handle value #123

mgeisler opened this issue Aug 21, 2012 · 1 comment
Labels

Comments

@mgeisler
Copy link

I haven't tested this, but the

INVALID_HANDLE_VALUE = 0xFFFFFFFF

declaration in winapi.py line 54 might cause problems on x64 Python. In the Mercurial project we do it like this instead:

_HANDLE = ctypes.c_void_p
_INVALID_HANDLE_VALUE = _HANDLE(-1).value
@barsch
Copy link

barsch commented Dec 12, 2013

using this as a monkey patch works for windows x64 py2.7 - without it fails complaining about invalid handle

...
from watchdog.utils import platform

# monkey
if platform.is_windows():
    import ctypes
    from watchdog.observers import winapi
    _HANDLE = ctypes.c_void_p
    _INVALID_HANDLE_VALUE = _HANDLE(-1).value

    winapi.INVALID_HANDLE_VALUE = _INVALID_HANDLE_VALUE
...

CCP-Aporia pushed a commit to CCP-Aporia/watchdog that referenced this issue Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants