标签:style blog ar color 使用 sp on div log
# -*- coding: cp936 -*- import ctypes import ctypes.wintypes #print(dir(ctypes)) #print(dir(ctypes.wintypes)) user32 = ctypes.WinDLL("user32.dll") FindWindowA = user32.FindWindowA GetWindowTextA = user32.GetWindowTextA EnumWindows = user32.EnumWindows #Windows回调函数 def EnumWindowProc(hWnd, lParam): text = ctypes.c_char_p() text.value = "" GetWindowTextA(hWnd, text, 200) print(text.value) return 1 #声明原型,注意需要首先要声明返回值类型 pFunc = ctypes.WINFUNCTYPE(ctypes.c_int, ctypes.wintypes.HWND, ctypes.wintypes.LPARAM) pFuncHandle = pFunc(EnumWindowProc) EnumWindows(pFuncHandle, None)
标签:style blog ar color 使用 sp on div log
原文地址:http://www.cnblogs.com/sunlb/p/4125445.html