Skip to content

Commit 2a68f15

Browse files
committed
Fix test.support
1 parent 05c3378 commit 2a68f15

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/test/support/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ def GetProcessWindowStation() -> ctypes.wintypes.HANDLE:
258258
if not h:
259259
raise ctypes.WinError()
260260

261+
@ctypes.util.wrap_dll_function(user32)
261262
def GetUserObjectInformationW(
262263
hObj: ctypes.wintypes.HANDLE,
263264
nIndex: ctypes.c_int,
@@ -271,9 +272,9 @@ def GetUserObjectInformationW(
271272
needed = ctypes.wintypes.DWORD()
272273
res = GetUserObjectInformationW(h,
273274
UOI_FLAGS,
274-
uof,
275+
ctypes.byref(uof),
275276
ctypes.sizeof(uof),
276-
needed)
277+
ctypes.byref(needed))
277278
if not res:
278279
raise ctypes.WinError()
279280
if not bool(uof.dwFlags & WSF_VISIBLE):

0 commit comments

Comments
 (0)