PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Lib/ctypes/test/test_errcheck.py

http://unladen-swallow.googlecode.com/
Python | 19 lines | 2 code | 6 blank | 11 comment | 0 complexity | a02b9acbf9cf3ce22acc19d19dc6f8e1 MD5 | raw file
 1import sys
 2from ctypes import *
 3
 4##class HMODULE(Structure):
 5##    _fields_ = [("value", c_void_p)]
 6
 7##    def __repr__(self):
 8##        return "<HMODULE %s>" % self.value
 9
10##windll.kernel32.GetModuleHandleA.restype = HMODULE
11
12##print windll.kernel32.GetModuleHandleA("python23.dll")
13##print hex(sys.dllhandle)
14
15##def nonzero(handle):
16##    return (GetLastError(), handle)
17
18##windll.kernel32.GetModuleHandleA.errcheck = nonzero
19##print windll.kernel32.GetModuleHandleA("spam")