| 
 
| 赞 | 2 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 8 |  
| 经验 | 18919 |  
| 最后登录 | 2025-8-25 |  
| 在线时间 | 377 小时 |  
 Lv2.观梦者 
	梦石0 星屑754 在线时间377 小时注册时间2009-3-9帖子399 | 
5楼
 
 
 楼主|
发表于 2014-3-10 22:17:29
|
只看该作者 
| 晴兰 发表于 2014-3-10 13:27 ![]() RM用了SetCursor(NULL),也可以起到隐藏鼠标的作用,下面是奇怪的代码,在当前游戏进程屏蔽了ShowCursor和S ...
 哈哈,兰兰大神果然很厉害,我把你的代码转了一下,好理解多了:
 不过发现一个稍微严重的问题:游戏中一旦移动鼠标,FPS狂降!!虽然我知道你直接把函数内存地址改了,但是貌似还有提升的空间,还请兰兰大神帮忙再看看呗,谢啦。复制代码def dispose_proc(proc_address)
  w = Win32API.new('kernel32', 'VirtualProtect', 'LLLp', 'L')
  w.call(proc_address,  4,  0x40,  "RGBA")
  pid = Win32API.new('kernel32', 'GetCurrentProcess', '', 'L').call
  w = Win32API.new('kernel32', 'WriteProcessMemory','LLpLL', 'L')
  w.call(pid, proc_address,  "\x33\xc0\xc2\x04\x00",  5,  0)
end
def address_for_proc(dll_name, proc_name)
  mid = Win32API.new('kernel32', "GetModuleHandle", 'p', 'L').call(dll_name)
  Win32API.new('kernel32', "GetProcAddress", 'Lp', 'L').call(mid, proc_name)
end
dispose_proc(address_for_proc('user32', 'ShowCursor'))
dispose_proc(address_for_proc('user32', 'SetCursor'))
 | 
 |