Simple function-wrapping API with ctypes.