wechat-pc-hook-python icon indicating copy to clipboard operation
wechat-pc-hook-python copied to clipboard

ctypes.ArgumentError: argument 4: <class 'OverflowError'>: int too long to convert

Open 9DemonFox opened this issue 3 years ago • 9 comments

psutil.Process(pid=4908, name='WeChat.exe', status='running', started='09:22:49')
  File "D:/VUE/wechat-pc-hook-python/python_hook.py", line 42, in <module>
454
    c_remt = kernel32.CreateRemoteThread(h_process, None, 0, h_loadlib, arg_adress, 0, byref(thread_id))
590000
ctypes.ArgumentError: argument 4: <class 'OverflowError'>: int too long to convert

h_loadlib太大了,我调试为140721839729584

9DemonFox avatar Mar 01 '21 01:03 9DemonFox

可能是我的参数没有初始化导致的

holdyeah avatar Mar 02 '21 11:03 holdyeah

请问现在该怎么做呢?我用c_int函数强制转换h_loadlib结果微信崩溃了

longxiaokong avatar Jun 14 '21 11:06 longxiaokong

难道现在做呢?我用c_int函数强制转换h_loadlib结果微信崩溃了

会不会是python的问题,我用32位没有这个问题

holdyeah avatar Jun 14 '21 13:06 holdyeah

大大我的锅我的锅,path配错了导致python优先级挂了[捂脸] 真的很感谢您!

longxiaokong avatar Jun 15 '21 01:06 longxiaokong

大大我的锅我的锅,path配错了导致python优先级挂了[捂脸] 真的很感谢您!

嗯嗯,找到问题了就好

holdyeah avatar Jun 15 '21 06:06 holdyeah

同样的问题. 获取到的h_loadlib 太大了

guoqianyou avatar Jun 30 '21 19:06 guoqianyou

同样的问题. 获取到的h_loadlib 太大了

会不会有什么地方配置出问题了

holdyeah avatar Jul 03 '21 01:07 holdyeah

我的问题同样,h_hoadlib 是 140709872403696。 如果类型强制转换 wx就直接崩溃 。 目前还没有找到解决方案。 不太理解Kernel32 调 LoadLibaryA 返回的地址为啥这么高? 难道我机器内存太大?我的64G memory。

chenlei9907 avatar Jul 19 '21 06:07 chenlei9907

是python 的问题. 用32 位python 解决. 可能是 用64位的python 操作 32位的程序造成的

guoqianyou avatar Jul 21 '21 04:07 guoqianyou