Skip to content Skip to sidebar Skip to footer

In Python How Do I Set The Value Of A Lp_c_ubyte

I am creating a Python wrapper for a C DLL using python ctypes. I am having trouble updating a pointer to value in memory with python. In this example I have a DLL that has a regi

Solution 1:

The correct way to define the python callback is

def callbackUpdateValue( foo ):
    foo[0] =99

where foo[0] dereferences the pointer. More info can be found here: https://docs.python.org/2.5/lib/ctypes-callback-functions.html

Post a Comment for "In Python How Do I Set The Value Of A Lp_c_ubyte"