diff options
Diffstat (limited to 'lib/python2.7/ctypes/test/test_errcheck.py')
-rw-r--r-- | lib/python2.7/ctypes/test/test_errcheck.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/python2.7/ctypes/test/test_errcheck.py b/lib/python2.7/ctypes/test/test_errcheck.py new file mode 100644 index 0000000..a4913f9 --- /dev/null +++ b/lib/python2.7/ctypes/test/test_errcheck.py @@ -0,0 +1,19 @@ +import sys +from ctypes import * + +##class HMODULE(Structure): +## _fields_ = [("value", c_void_p)] + +## def __repr__(self): +## return "<HMODULE %s>" % self.value + +##windll.kernel32.GetModuleHandleA.restype = HMODULE + +##print windll.kernel32.GetModuleHandleA("python23.dll") +##print hex(sys.dllhandle) + +##def nonzero(handle): +## return (GetLastError(), handle) + +##windll.kernel32.GetModuleHandleA.errcheck = nonzero +##print windll.kernel32.GetModuleHandleA("spam") |