PyDocs

Nav

Generic Operating System Services

CFUNCTYPE

ctypes

function (source)
  • CFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False)
CFUNCTYPE(restype, *argtypes,
             use_errno=False, use_last_error=False) -> function prototype.

restype: the result type
argtypes: a sequence specifying the argument types

The function prototype can be called in different ways to create a
callable object:

prototype(integer address) -> foreign function
prototype(callable) -> create and return a C callable function from callable
prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method
prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal
prototype((function name, dll object)[, paramflags]) -> foreign function exported by name
1 Example
>>> CMPFUNC = CFUNCTYPE(c_int, POINTER(c_int), POINTER(c_int))
>>>
from the Python docs
See Also
No see-alsos for ctypes/CFUNCTYPE
0 Notes
No notes for CFUNCTYPE