1
0
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:
Athanasius 2023-01-12 15:52:49 +00:00
parent 085159f8cb
commit e5709727b6
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

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