我们从Python开源项目中,提取了以下6个代码示例,用于说明如何使用ctypes.wintypes.INT。
def _set_argtypes(self): ''' Functions arguments. ''' self.MONITORENUMPROC = WINFUNCTYPE(INT, DWORD, DWORD, POINTER(RECT), DOUBLE) windll.user32.GetSystemMetrics.argtypes = [INT] windll.user32.EnumDisplayMonitors.argtypes = [HDC, c_void_p, self.MONITORENUMPROC, LPARAM] windll.user32.GetWindowDC.argtypes = [HWND] windll.gdi32.CreateCompatibleDC.argtypes = [HDC] windll.gdi32.CreateCompatibleBitmap.argtypes = [HDC, INT, INT] windll.gdi32.SelectObject.argtypes = [HDC, HGDIOBJ] windll.gdi32.BitBlt.argtypes = [HDC, INT, INT, INT, INT, HDC, INT, INT, DWORD] windll.gdi32.DeleteObject.argtypes = [HGDIOBJ] windll.gdi32.GetDIBits.argtypes = [HDC, HBITMAP, UINT, UINT, c_void_p, POINTER(BITMAPINFO), UINT]
def _set_restypes(self): ''' Functions return type. ''' windll.user32.GetSystemMetrics.restypes = INT windll.user32.EnumDisplayMonitors.restypes = BOOL windll.user32.GetWindowDC.restypes = HDC windll.gdi32.CreateCompatibleDC.restypes = HDC windll.gdi32.CreateCompatibleBitmap.restypes = HBITMAP windll.gdi32.SelectObject.restypes = HGDIOBJ windll.gdi32.BitBlt.restypes = BOOL windll.gdi32.GetDIBits.restypes = INT windll.gdi32.DeleteObject.restypes = BOOL