On 19 июл, 21:09, Christian Heimes <li...@cheimes.de> wrote: > resurtm wrote: > > Can anybody explain my errors when trying to pass callback to DLL > > function? > > > Thanks for advices and solutions! > > You have to keep a reference to the callback alive yourself. ctypes > doesn't increase the refernece counter of the function when you define a > callback. As soon as the ref counter reaches 0, the function object is > collected and the pointer to the callback is invalid. > > You could assign it to a module global or instance variable. > > Christian
Thanks for help Christian! It's working fine now! ;-) -- http://mail.python.org/mailman/listinfo/python-list