0
from ctypes import *
from capstone import *

k32 = windll.kernel32
dbghelp = cdll.LoadLibrary('dbghelp.dll')

handle = k32.LoadLibraryEx(modulePath, 0, 1) #DONT_RESOLVE_DLL_REFERENCES
hproc = k32.GetCurrentProcess()

ret = dbghelp.SymInitialize(hproc, sympath, 1)

SymInitialize returns 0

GetLastError returns -1073741813

What I'm doing wrong, same code written in C++ works just fine.

4

1 回答 1

0

我指定了确切的函数签名,现在它可以工作了。

from ctypes.wintypes import HANDLE, LPCSTR, UINT 
si = windll.dbghelp.SymInitialize
si.argtypes = [HANDLE, LPCSTR, UINT]
于 2019-01-29T15:28:29.477 回答