calldll and python20
Sam Schulenburg
samschul at pacbell.net
Wed Oct 18 02:11:15 EDT 2000
I tried to recompile calldll for python20 and get the following error
when I try to load the dll>
Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.6 -- press F1 for help
>>> import calldll
Traceback (innermost last):
File "<pyshell#0>", line 1, in ?
import calldll
ImportError: dynamic module does not define init function (initcalldll)
>>>
The initcalldll function is defined as follows:
__declspec(dllexport) void
initcalldll(void)
{
PyObject *dict, *module;
module = Py_InitModule ("calldll", calldll_functions);
dict = PyModule_GetDict (module);
calldll_module_error = PyString_FromString ("calldll error");
PyDict_SetItemString (dict, "error", calldll_module_error);
/* initialize our thread local storage index */
thread_state_tls_index = TlsAlloc();
/* This is not actually needed, we could just use
calldll.get_proc_address to get them! */
PyDict_SetItemString (
dict,
"addrs",
Py_BuildValue (
"(lll)",
&Py_BuildValue,
&PyInt_AsLong,
/* &PyEval_CallObject */ /* OR */
&thread_safe_call_object
)
);
I can not find any problems with the above function declaration. Any
ideas?
Sam Schulenburg
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list