64位hook api崩溃,32位没问题

vivi992 2021-12-6 12441

用的Hook_API这个函数

 

Dim Shared  PMessageBox As Function(ByVal hWnd As hWnd ,ByVal lpText As ZString Ptr ,ByVal lpCaption As ZString Ptr ,ByVal uType As ULong) As Long

------------------------

'替换函数

Function oMessageBox(ByVal hWnd As hWnd ,ByVal lpText As ZString Ptr ,ByVal lpCaption As ZString Ptr ,ByVal uType As ULong) As Long
   Static ret As Long   
   ret = PMessageBox(hWnd ,lpText ,lpCaption ,uType)  
   Function = ret 
End Function

-------------------------

'hook MessageBoxA

 Dim addr As Any Ptr = Hook_API("user32" ,"MessageBoxA" ,@oMessageBox)
 If addr Then   PMessageBox = addr

 

因国家互联网安全管理要求,关闭回帖功能。大家需要留言,请使用【勇芳软件客服】即时联系勇芳点此打开->>勇芳软件客服
返回
联系勇芳
发新帖 搜索 反馈 回顶部