ctypes常用dll

导入ctypes以后cdll.msvcrt为标准c的函数库,可以调用标准C里的函数,如

from ctypes import *
libc = cdll.msvcrt
print(libc.printf)
print(libc.time(None))
print(libc.sin(2))

windll代表windows的一些常用dll,如

from ctypes import *
libc = cdll.msvcrt
print(hex(windll.kernel32.GetModuleHandleA(None)))
原文地址:https://www.cnblogs.com/wangjixianyun/p/2836315.html