mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-24 12:40:52 +03:00
monitor: Properly prototype EnumWindows
This commit is contained in:
parent
e5709727b6
commit
aaf83645f7
11
monitor.py
11
monitor.py
@ -49,13 +49,20 @@ if sys.platform == 'darwin':
|
||||
|
||||
elif sys.platform == 'win32':
|
||||
import ctypes
|
||||
from ctypes import WINFUNCTYPE, windll
|
||||
from ctypes.wintypes import BOOL, HWND, LPARAM, LPWSTR
|
||||
|
||||
from watchdog.events import FileCreatedEvent, FileSystemEventHandler
|
||||
from watchdog.observers import Observer
|
||||
|
||||
EnumWindows = ctypes.windll.user32.EnumWindows
|
||||
EnumWindowsProc = ctypes.WINFUNCTYPE(BOOL, HWND, LPARAM)
|
||||
# BOOL EnumWindows(
|
||||
# [in] WNDENUMPROC lpEnumFunc,
|
||||
# [in] LPARAM lParam
|
||||
# );
|
||||
EnumWindowsProc = WINFUNCTYPE(BOOL, HWND, LPARAM)
|
||||
prototype = WINFUNCTYPE(BOOL, EnumWindowsProc, LPARAM)
|
||||
paramflags = (1, "lpEnumFunc"), (1, "lParam")
|
||||
EnumWindows = prototype(("EnumWindows", windll.user32), paramflags)
|
||||
|
||||
CloseHandle = ctypes.windll.kernel32.CloseHandle
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user