I'm relatively new to python. I'm trying to debug the below mentioned problem. Can someone please help me with this?
-------------------------------
from ctypes import *
class CALLBACKMSG(Structure):
_fields_ = [("uParam", c_int), ("pParam", c_void_p)]
CBFUNC = CFUNCTYPE(c_int, c_int, byref(CALLBACKMSG()))
def CbNotify(x, pcbMessage):
print "Hello"
return 0
print "Start"
-------------------------------
I get the below error when I run this
Traceback (most recent call last):
File "C:\Python25\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py" , line 307, in RunScript
debugger.run(codeObject, __main__.__dict__, start_stepping=0)
File "C:\Python25\Lib\site-packages\pythonwin\pywin\debugger\__init__.py", line 60, in run
_GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
File "C:\Python25\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", line 631, in run
exec cmd in globals, locals
File "C:\Nissan-Telematics\dev_gmaps\Python\Script2.py", line 6, in <module>
CBFUNC = CFUNCTYPE(c_int, c_int, byref(CALLBACKMSG()))
File "C:\Python25\lib\ctypes\__init__.py", line 101, in CFUNCTYPE
class CFunctionType(_CFuncPtr):
TypeError: Error when calling the metaclass bases
item 2 in _argtypes_ has no from_param method
Thank you for reading