Package ctypes
create and manipulate C data types in Python
|
|
function prototype
|
CFUNCTYPE(restype,
*argtypes)
restype: the result type argtypes: a sequence specifying the argument
types |
|
|
|
|
|
DllGetClassObject(rclsid,
riid,
ppv) |
|
|
|
|
|
PYFUNCTYPE(restype,
*argtypes) |
|
|
|
SetPointerType(pointer,
cls) |
|
|
|
WINFUNCTYPE(restype,
*argtypes) |
|
|
|
WinError(code=None,
descr=None) |
|
|
|
c_buffer(init,
size=None) |
|
|
|
|
character array
|
create_string_buffer(aString)
create_string_buffer(anInteger) -> character array
create_string_buffer(aString, anInteger) -> character array |
|
|
character array
|
create_unicode_buffer(aString)
create_unicode_buffer(anInteger) -> character array
create_unicode_buffer(aString, anInteger) -> character array |
|
|
|
|
string
|
string_at(addr,
size=...)
Return the string at addr. |
|
|
string
|
wstring_at(addr,
size=...)
Return the string at addr. |
|
|
|
DEFAULT_MODE = 0
|
|
GetLastError = windll.coredll.GetLastError
|
|
_FUNCFLAG_STDCALL = _FUNCFLAG_CDECL
|
|
_c_functype_cache = { ( <class 'ctypes.py_object'>, ( <class 'cty...
|
|
_cast = PYFUNCTYPE(py_object, c_void_p, py_object, py_object)(...
|
|
_pointer_type_cache = { None: <class 'ctypes.c_void_p'>, <class...
|
|
_string_at = CFUNCTYPE(py_object, c_void_p, c_int)(_string_at_...
|
|
_win_functype_cache = {}
|
|
_wstring_at = CFUNCTYPE(py_object, c_void_p, c_int)(_wstring_a...
|
|
cdll = LibraryLoader(CDLL)
|
|
memmove = CFUNCTYPE(c_void_p, c_void_p, c_void_p, c_size_t)(_m...
|
|
memset = CFUNCTYPE(c_void_p, c_void_p, c_int, c_size_t)(_memse...
|
|
oledll = LibraryLoader(OleDLL)
|
|
pydll = LibraryLoader(PyDLL)
|
|
pythonapi = <PyDLL 'None', handle 400164f8 at 40e5576c>
|
|
windll = LibraryLoader(WinDLL)
|
Imports:
util,
Array,
BigEndianStructure,
FormatError,
LittleEndianStructure,
RTLD_GLOBAL,
RTLD_LOCAL,
Structure,
Union,
_CFuncPtr,
_FUNCFLAG_CDECL,
_FUNCFLAG_PYTHONAPI,
_Pointer,
_SimpleCData,
_calcsize,
_cast_addr,
_check_HRESULT,
_ctypes_version,
_dlopen,
_endian,
_memmove_addr,
_memset_addr,
_os,
_string_at_addr,
_sys,
_wstring_at_addr,
addressof,
alignment,
byref,
gestalt,
macholib,
resize,
set_conversion_mode,
sizeof
CFUNCTYPE(restype,
*argtypes)
|
|
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
- Returns: function prototype
|
_c_functype_cache
- Value:
{ ( <class 'ctypes.py_object'>,
( <class 'ctypes.c_void_p'>, <class 'ctypes.c_long'>) ) : <class 'ctype
s.CFunctionType'>,
( <class 'ctypes.c_void_p'>,
( <class 'ctypes.c_void_p'>,
<class 'ctypes.c_long'>,
<class 'ctypes.c_ulong'>) ) : <class 'ctypes.CFunctionType'>,
( <class 'ctypes.c_void_p'>, ( <class 'ctypes.c_void_p'>, <class 'ctype
...
|
|
_cast
- Value:
PYFUNCTYPE(py_object, c_void_p, py_object, py_object)(_cast_addr)
|
|
_pointer_type_cache
- Value:
{ None: <class 'ctypes.c_void_p'>,
<class 'ctypes.c_char'>: <class 'ctypes.LP_c_char'>,
<class 'ctypes.c_wchar'>: <class 'ctypes.LP_c_wchar'>}
|
|
_string_at
- Value:
CFUNCTYPE(py_object, c_void_p, c_int)(_string_at_addr)
|
|
_wstring_at
- Value:
CFUNCTYPE(py_object, c_void_p, c_int)(_wstring_at_addr)
|
|
memmove
- Value:
CFUNCTYPE(c_void_p, c_void_p, c_void_p, c_size_t)(_memmove_addr)
|
|
memset
- Value:
CFUNCTYPE(c_void_p, c_void_p, c_int, c_size_t)(_memset_addr)
|
|