Callback functions

Toby t.harris at robinsons.co.uk
Thu Jan 18 10:11:44 EST 2001


I am in the process of writing an extension to python for Windows NT using
VC++ which implements a peer to peer network driver written in C++ compiled
into a DLL.

The C++ driver requires a callback into python code, I have got to the point
where a test function written in C++ to callback the python function works
successfully, but all attempts to call the python callback from within the
C++ DLL fail at :

    result = PyEval_CallObject(func, args);

I have printed values for func and args and they appear identical when
called from Python and from the DLL... however I get the following error

    The instruction at "0x0023f4b3" referenced memory at "0x0000000c". The
memory could not be "read".

I have scoured much of the online documentattion regarding extending &
embedding Python all without success...

Any help is much appreciated
Toby





More information about the Python-list mailing list