kharlashkin Posted October 10, 2016 Share Posted October 10, 2016 Вопрос незнающего человека. Ctypes заработает с Вашим PYD? @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted October 10, 2016 Share Posted October 10, 2016 Ctypes заработает с Вашим PYD?по идее без структур ничего не запустишь... @ Quote Link to comment Short link Share on other sites More sharing options...
kharlashkin Posted October 10, 2016 Share Posted October 10, 2016 по идее без структур ничего не запустишь... Ну я джва года ждал штобы грабить корованы - не спешу в принципе никуда ;) @ Quote Link to comment Short link Share on other sites More sharing options...
fecell Posted October 10, 2016 Author Share Posted October 10, 2016 (edited) @Mixaill, сигнатуры некоторые можно сократить. "\x55\x8B\xEC\x81\xEC\x14\x02" (xxxxxxx) достаточно для Py_InitModule4, по крайней мере с 9.4 и до сих пор (на тестовых не знаю). Edited October 10, 2016 by fecell @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted October 10, 2016 Share Posted October 10, 2016 сигнатуры некоторые можно сократить.Я даже на питоне написал функцию для минимилазции) Сути это не меняет. Лишние несколько байт не мешают ведь. @ Quote Link to comment Short link Share on other sites More sharing options...
StranikS_Scan Posted October 10, 2016 Share Posted October 10, 2016 Я даже на питоне написал функцию для минимилазции) Сути это не меняет. Лишние несколько байт не мешают ведь. Вот меня периодически спрашивают, почему я код self.angles = (0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 210, 225, 240, 255, 270, 285, 300, 315, 330, 345) не запишу циклом. А я отвечаю - константы ни кому еще не мешали ))))))) @ Quote Link to comment Short link Share on other sites More sharing options...
Mixaill Posted October 10, 2016 Share Posted October 10, 2016 (edited) Вопрос незнающего человека. Ctypes заработает с Вашим PYD? Можно попытаться. Edited October 16, 2016 by Mixaill @ Quote Link to comment Short link Share on other sites More sharing options...
fecell Posted October 10, 2016 Author Share Posted October 10, 2016 PyList_New PyList_Append_tmpl = "\x55\x8B\xEC\x8B\x4D\x08\x8B\x41\x04\xF7\x40\x54\x00\x00\x00\x02\x74";PyList_Append_mask = "xxxxxxxxxxxxxxxxx"; PyList_New_tmpl = "\x55\x8B\xEC\x57\x8B\x7D\x08\x85\xFF\x79"; PyList_New_mask = "xxxxxxxxxx"; @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted October 10, 2016 Share Posted October 10, 2016 (edited) @fecell, ну такие простые функции можно было и не скидывать. А вот PyCapsule_IsValid, PyCapsule_GetPointer и прочие полезно было бы и отыскать... Edited October 10, 2016 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
fecell Posted October 10, 2016 Author Share Posted October 10, 2016 (edited) PyCapsule_IsValid смещение E9A9A0 (9.16), 12DBD10 (9.14) сигнатуру признаться не смотрел. PyCapsule_GetPointer E9A7D0 (9.16), 12DBB40 (9.14) 'бросилось в глаза.. остальные завтра, три ночи за окном как-никак' # PyDict_GetItem_Address \x55\x8b\xec\x83\xec\x08\x53\x8b\x5d\x08\x8b\x43\x04\xf7\x40\x54\x00\x00\x00\x20\x75\x07\x33\xc0\x5b\x8b\xe5\x5d\xc3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx # WorldOfTanks_9_15o.exe \x55\x8b\xec\x83\xec\x08\x53\x8b\x5d\x08\x8b\x43 xxxxxxxxxxxx # WorldOfTanks_9_16o.exe \x55\x8b\xec\x83\xec\x08\x53\x8b\x5d\x08\x8b\x43 xxxxxxxxxxxx избыточность уж слишком большая, имхо. Edited October 11, 2016 by fecell @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted October 10, 2016 Share Posted October 10, 2016 (edited) смещение E9A9E0 (9.16), 12DBD10 (9.14) сигнатуру признаться не смотрел.Вообще не то. Это PyCapsule_New Edited October 10, 2016 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
fecell Posted October 11, 2016 Author Share Posted October 11, 2016 (edited) Вообще не то. Это PyCapsule_New блин, ночью заметил что ошибся, и исправил на... тоже самое что было, по запарке. Сейчас уже выше исправил смещение на верное. 'asm code for check' .text:00E9A9A0 sub_E9A9A0 proc near .text:00E9A9A0 .text:00E9A9A0 arg_0= dword ptr 8 .text:00E9A9A0 arg_4= dword ptr 0Ch .text:00E9A9A0 .text:00E9A9A0 push ebp .text:00E9A9A1 mov ebp, esp .text:00E9A9A3 mov eax, [ebp+arg_0] .text:00E9A9A6 test eax, eax .text:00E9A9A8 jz short loc_E9A9D2 .text:00E9A9AA cmp dword ptr [eax+4], offset unk_1980968 .text:00E9A9B1 jnz short loc_E9A9D2 .text:00E9A9B3 cmp dword ptr [eax+8], 0 .text:00E9A9B7 jz short loc_E9A9D2 .text:00E9A9B9 push [ebp+arg_4] .text:00E9A9BC push dword ptr [eax+0Ch] .text:00E9A9BF call sub_E9AA80 .text:00E9A9C4 add esp, 8 .text:00E9A9C7 test eax, eax .text:00E9A9C9 jz short loc_E9A9D2 .text:00E9A9CB mov eax, 1 .text:00E9A9D0 pop ebp .text:00E9A9D1 retn .text:00E9A9D2 .text:00E9A9D2 loc_E9A9D2: .text:00E9A9D2 xor eax, eax .text:00E9A9D4 pop ebp .text:00E9A9D5 retn .text:00E9A9D5 sub_E9A9A0 endp .text:1E0860F0 ; Attributes: bp-based frame .text:1E0860F0 .text:1E0860F0 ; int __cdecl PyCapsule_IsValid(_object *o, const char *name) .text:1E0860F0 public _PyCapsule_IsValid .text:1E0860F0 _PyCapsule_IsValid proc near ; CODE XREF: importmap+33↑p .text:1E0860F0 ; importmap_0+33↑p ... .text:1E0860F0 .text:1E0860F0 o = dword ptr 8 .text:1E0860F0 name = dword ptr 0Ch .text:1E0860F0 .text:1E0860F0 push ebp .text:1E0860F1 mov ebp, esp .text:1E0860F3 mov eax, [ebp+o] .text:1E0860F6 test eax, eax .text:1E0860F8 jz short loc_1E08611F .text:1E0860FA cmp dword ptr [eax+4], offset _PyCapsule_Type .text:1E086101 jnz short loc_1E08611F .text:1E086103 cmp dword ptr [eax+8], 0 .text:1E086107 jz short loc_1E08611F .text:1E086109 mov ecx, [ebp+name] ; name2 .text:1E08610C mov eax, [eax+0Ch] ; name1 .text:1E08610F call name_matches .text:1E086114 test eax, eax .text:1E086116 jz short loc_1E08611F .text:1E086118 mov eax, 1 .text:1E08611D pop ebp .text:1E08611E retn .text:1E08611F ; --------------------------------------------------------------------------- .text:1E08611F .text:1E08611F loc_1E08611F: ; CODE XREF: _PyCapsule_IsValid+8↑j .text:1E08611F ; _PyCapsule_IsValid+11↑j ... .text:1E08611F xor eax, eax .text:1E086121 pop ebp .text:1E086122 retn .text:1E086122 _PyCapsule_IsValid endp Edited October 11, 2016 by fecell @ Quote Link to comment Short link Share on other sites More sharing options...
fecell Posted October 15, 2016 Author Share Posted October 15, 2016 (edited) обновил первый пост под 9.16, добавил в исходник пример реализации __doc__ для пида. Edited October 15, 2016 by fecell 2 @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted October 17, 2016 Share Posted October 17, 2016 (edited) Можно попытаться. @kharlashkin, ну что? У меня так: ImportError: dynamic module does not define init function (initpython27) Edited October 17, 2016 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
Mixaill Posted October 17, 2016 Share Posted October 17, 2016 @kharlashkin, ну что? У меня так: Снимок экрана (310).png ImportError: dynamic module does not define init function (initpython27) Потому что Python27 (с большой буковки) _ctypes у меня вчера крашился c access violation, возможно неверно завернул структуры (ещё нет в репе) @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted October 17, 2016 Share Posted October 17, 2016 (edited) Потому что Python27 (с большой буковки)Блин. Точно.Теперь так _ctypes = imp.load_dynamic('_ctypes', 'res_mods/_ctypes.pyd') #ImportError: DLL load failed: Не найдена указанная процедура. Edited October 17, 2016 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
Mixaill Posted October 17, 2016 Share Posted October 17, 2016 Блин. Точно. Теперь так _ctypes = imp.load_dynamic('_ctypes', 'res_mods/_ctypes.pyd') #ImportError: DLL load failed: Не найдена указанная процедура. Залил вчерашние наработки, теперь дойдет до краша. @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted October 22, 2016 Share Posted October 22, 2016 Залил вчерашние наработки, теперь дойдет до краша.ctypes should works now обнадеживает) @ Quote Link to comment Short link Share on other sites More sharing options...
Mixaill Posted October 22, 2016 Share Posted October 22, 2016 Ну, импортируется без проблем, дальше не пытался. @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted October 22, 2016 Share Posted October 22, 2016 @Mixaill, всё-таки может где-то можно найти libAS3.lib из Scaleform 4.5x?.. Эта страница только дразнит) https://gamedev.autodesk.com/releases/57c71f3e412ecc150073cd50 @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.