MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / MapWindowPoints

Function MapWindowPoints

pydevd_attach_to_process/winappdbg/win32/user32.py:1311–1326  ·  view source on GitHub ↗
(hWndFrom, hWndTo, lpPoints)

Source from the content-addressed store, hash-verified

1309# __in UINT cPoints
1310# );
1311def MapWindowPoints(hWndFrom, hWndTo, lpPoints):
1312 _MapWindowPoints = windll.user32.MapWindowPoints
1313 _MapWindowPoints.argtypes = [HWND, HWND, LPPOINT, UINT]
1314 _MapWindowPoints.restype = ctypes.c_int
1315
1316 cPoints = len(lpPoints)
1317 lpPoints = (POINT * cPoints)(*lpPoints)
1318 SetLastError(ERROR_SUCCESS)
1319 number = _MapWindowPoints(hWndFrom, hWndTo, byref(lpPoints), cPoints)
1320 if number == 0:
1321 errcode = GetLastError()
1322 if errcode != ERROR_SUCCESS:
1323 raise ctypes.WinError(errcode)
1324 x_delta = number & 0xFFFF
1325 y_delta = (number >> 16) & 0xFFFF
1326 return x_delta, y_delta, [(Point.x, Point.y) for Point in lpPoints]
1327
1328
1329# BOOL SetForegroundWindow(

Callers 2

translateMethod · 0.85
translateMethod · 0.85

Calls 2

SetLastErrorFunction · 0.90
GetLastErrorFunction · 0.90

Tested by

no test coverage detected