mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-24 12:40:52 +03:00
monitor: Rename GetWindowTextLength to GetWindowTextLengthW
It's using the win32/user32 GetWindowTextLengthW() so name it appropriately.
This commit is contained in:
parent
085159f8cb
commit
e5709727b6
@ -61,7 +61,7 @@ elif sys.platform == 'win32':
|
||||
|
||||
GetWindowText = ctypes.windll.user32.GetWindowTextW
|
||||
GetWindowText.argtypes = [HWND, LPWSTR, ctypes.c_int]
|
||||
GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW
|
||||
GetWindowTextLengthW = ctypes.windll.user32.GetWindowTextLengthW
|
||||
|
||||
GetProcessHandleFromHwnd = ctypes.windll.oleacc.GetProcessHandleFromHwnd
|
||||
|
||||
@ -2032,7 +2032,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
elif sys.platform == 'win32':
|
||||
def WindowTitle(h): # noqa: N802 # type: ignore
|
||||
if h:
|
||||
length = GetWindowTextLength(h) + 1
|
||||
length = GetWindowTextLengthW(h) + 1
|
||||
buf = ctypes.create_unicode_buffer(length)
|
||||
if GetWindowText(h, buf, length):
|
||||
return buf.value
|
||||
|
Loading…
x
Reference in New Issue
Block a user