structure fieldctype is ctype class describing the typeand width is an integer bitfield width for exampleconsider the following structurestruct point double xy}the ctypes description of this structure is class point(structure)_fields_ (" "c_double)(" "c_doublecalling foreign functions to call functions in libraryyou simply call the appropriate function with set of arguments that are compatible with its type signature for simple datatypes such as c_intc_doubleand so forthyou can just pass compatible python types as input (integersfloatsand so onit is also possible to pass instances of c_intc_double and similar types as input for arraysyou can just pass python sequence of compatible types to pass pointer to foreign functionyou must first create ctypes instance that represents the value that will be pointed at and then create pointer object using one of the following functionsbyref(cvalue [offset]represents lightweight pointer to cvalue cvalue must be an instance of ctypes datatype offset is byte offset to add to the pointer value the value returned by the function can only be used in function calls pointer(cvaluecreates pointer instance pointing to cvalue cvalue must be an instance of ctypes datatype this creates an instance of the pointer type described earlier here is an example showing how you would pass parameter of type double into functiondval c_double( foo(byref(dval)create double instance calls foo(&dvalp_dval pointer(dvalr foo(p_dvalcreates pointer variable calls foo(p_dvalinspect the value of dval afterwards print (dval valueit should be noted that you cannot create pointers to built-in types such as int or float passing pointers to such types would violate mutability if the underlying function changed the value the cobj value attribute of ctypes instance cobj contains the internal data for examplethe reference to dval value in the previous code returns the floating-point value stored inside the ctypes c_double instance dval lib fl ff