| 
当你一段时间没动鼠标时,RM会把鼠标指针藏起来
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  今天试试鞋盒掉这个没用[是这个东西没用吧?]的功能
 
 试了一下,成功了
 
 
 class DontHideCursor   PAGE_EXECUTE_READWRITE = 0x40   def initialize    @getModuleHandle=Win32API.new('kernel32.dll','GetModuleHandleA','p','i')    @getProcAddress=Win32API.new('kernel32.dll','GetProcAddress','ip','i')    @virtualProtect=Win32API.new('kernel32.dll','VirtualProtect','iiip','i')    @memcpy=Win32API.new('kernel32.dll','RtlMoveMemory','ipi','v')  end   def InstallHook    hMod = @getModuleHandle.call('user32.dll')    @FuncAddr = @getProcAddress.call(hMod,'SetCursor')    unless @FuncAddr == 0      oldProtect = "\000" * 4      if @virtualProtect.call(@FuncAddr,5,PAGE_EXECUTE_READWRITE,oldProtect) != 0        @memcpy.call(@FuncAddr,"\xC2\x04\x00",3)        @virtualProtect.call(@FuncAddr,5,oldProtect.unpack('I')[0],nil)      end    end  end end DontHideCursor.new.InstallHook
class DontHideCursor 
  
  PAGE_EXECUTE_READWRITE = 0x40 
  
  def initialize 
    @getModuleHandle=Win32API.new('kernel32.dll','GetModuleHandleA','p','i') 
    @getProcAddress=Win32API.new('kernel32.dll','GetProcAddress','ip','i') 
    @virtualProtect=Win32API.new('kernel32.dll','VirtualProtect','iiip','i') 
    @memcpy=Win32API.new('kernel32.dll','RtlMoveMemory','ipi','v') 
  end 
  
  def InstallHook 
    hMod = @getModuleHandle.call('user32.dll') 
    @FuncAddr = @getProcAddress.call(hMod,'SetCursor') 
    unless @FuncAddr == 0 
      oldProtect = "\000" * 4 
      if @virtualProtect.call(@FuncAddr,5,PAGE_EXECUTE_READWRITE,oldProtect) != 0 
        @memcpy.call(@FuncAddr,"\xC2\x04\x00",3) 
        @virtualProtect.call(@FuncAddr,5,oldProtect.unpack('I')[0],nil) 
      end 
    end 
  end 
  
end 
  
DontHideCursor.new.InstallHook 
缺点:整个游戏(确切地说,是整个程序)都只能有一种鼠标指针(默认的箭头),而且不能用SetCursor改变。不过也没什么影响,现有的鼠标系统使用的ShowCursor一样可以把它隐藏
 
 顺便吐槽一下那个验证码 太难认了
 |