Quote:
Originally Posted by __wadim
hast du eine library datei erstellt mit den zu exportierenden funktionen?
|
jo, spiel disassembliert, nötigen funktionen rausgesucht, in meine dll gepackt, exportiert, in den spielordner eingefügt, fehler bekommen.
hab hier ne grobe übersicht:
Code:
int __declspec(dllexport) __stdcall Py_SetProgramName() { return 0; }
int __declspec(dllexport) __stdcall PyImport_AddModule() { return 0; }
int __declspec(dllexport) __stdcall PyModule_GetDict() { return 0; }
int __declspec(dllexport) __stdcall PyImport_ImportModule() { return 0; }
int __declspec(dllexport) __stdcall PyDict_SetItemString() { return 0; }
int __declspec(dllexport) __stdcall PyRun_String() { return 0; }
int __declspec(dllexport) __stdcall Py_Initialize() { return 0; }
int __declspec(dllexport) __stdcall PyErr_Fetch() { return 0; }
int __declspec(dllexport) __stdcall PyNumber_Check() { return 0; }
int __declspec(dllexport) __stdcall PyObject_GetAttr() { return 0; }
int __declspec(dllexport) __stdcall PyObject_GetAttrString() { return 0; }
int __declspec(dllexport) __stdcall PyErr_Clear() { return 0; }
int __declspec(dllexport) __stdcall PyCallable_Check() { return 0; }
int __declspec(dllexport) __stdcall PyObject_CallObject() { return 0; }
int __declspec(dllexport) __stdcall PyErr_Print() { return 0; }
int __declspec(dllexport) __stdcall PyString_Type() { return 0; }
int __declspec(dllexport) __stdcall PyString_AsString() { return 0; }
int __declspec(dllexport) __stdcall PyFloat_AsDouble() { return 0; }
int __declspec(dllexport) __stdcall _Py_NoneStruct() { return 0; }
int __declspec(dllexport) __stdcall PyErr_BadArgument() { return 0; }
int __declspec(dllexport) __stdcall PyList_New() { return 0; }
int __declspec(dllexport) __stdcall PyString_FromString() { return 0; }
int __declspec(dllexport) __stdcall PyList_Append() { return 0; }
int __declspec(dllexport) __stdcall PyTuple_Type() { return 0; }
int __declspec(dllexport) __stdcall PyInt_AsLong() { return 0; }
int __declspec(dllexport) __stdcall PyString_InternFromString() { return 0; }
int __declspec(dllexport) __stdcall Py_Finalize() { return 0; }
int __declspec(dllexport) __stdcall PyExc_RuntimeError() { return 0; }
int __declspec(dllexport) __stdcall PyErr_SetString() { return 0; }
int __declspec(dllexport) __stdcall PyTuple_GetItem() { return 0; }
int __declspec(dllexport) __stdcall PyDict_Type() { return 0; }
int __declspec(dllexport) __stdcall PyType_IsSubtype() { return 0; }
int __declspec(dllexport) __stdcall PyDict_GetItemString() { return 0; }
int __declspec(dllexport) __stdcall PyLong_AsLong() { return 0; }
int __declspec(dllexport) __stdcall PyTuple_Size() { return 0; }
int __declspec(dllexport) __stdcall Py_InitModule4() { return 0; }
int __declspec(dllexport) __stdcall PyModule_AddIntConstant() { return 0; }
int __declspec(dllexport) __stdcall Py_BuildValue() { return 0; }
und mein def file sieht so aus:
Code:
LIBRARY"python22"
EXPORTS
Py_SetProgramName @ 1;
PyImport_AddModule @ 2;
PyModule_GetDict @ 3;
PyImport_ImportModule @ 4;
PyDict_SetItemString @ 5;
PyRun_String @ 6;
Py_Initialize @ 7;
PyErr_Fetch @ 8;
PyNumber_Check @ 9;
PyObject_GetAttr @ 10;
PyObject_GetAttrString @ 11;
PyErr_Clear @ 12;
PyCallable_Check @ 13;
PyObject_CallObject @ 14;
PyErr_Print @ 15;
PyString_Type @ 16;
PyString_AsString @ 17;
PyFloat_AsDouble @ 18;
_Py_NoneStruct @ 19;
PyErr_BadArgument @ 20;
PyList_New @ 21;
PyString_FromString @ 22;
PyList_Append @ 23;
PyTuple_Type @ 24;
PyInt_AsLong @ 25;
PyString_InternFromString @ 26;
Py_Finalize @ 27;
PyExc_RuntimeError @ 28;
PyErr_SetString @ 29;
PyTuple_GetItem @ 30;
PyDict_Type @ 31;
PyType_IsSubtype @ 32;
PyDict_GetItemString @ 33;
PyLong_AsLong @ 34;
PyTuple_Size @ 35;
Py_InitModule4 @ 36;
PyModule_AddIntConstant @ 37;
Py_BuildValue @ 38;
beim disassemblieren sind alle funktionen drin!
hier mal die dll: