Skip to content

tmr232/pywrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pywrap

Simple function-wrapping API with ctypes.

Usage

Replace this:

prototype = ctypes.WINFUNCTYPE(wintypes.HANDLE, wintypes.UINT, wintypes.HANDLE)
paramflags = (1, "uFormat"), (1, "hMem")
SetClipboardData = prototype(("SetClipboardData", user32), paramflags)
SetClipboardData.errcheck = null_errcheck

With this:

SetClipboardData = pywrap.wrap_winapi(name="SetClipboardData",
                                        library=user32,
                                        restype=wintypes.BOOL,
                                        params=[
                                            Parameter("uFormat", wintypes.UINT),
                                            Parameter("hMem", wintypes.HANDLE)
                                        ],
                                        errcheck=null_errcheck)

About

Simple function-wrapping API with ctypes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages