io.open() import lsp; var rtn = lsp.install( function(processName,processID,threadID,addr,fmt,protocol){ if(io.splitpath(processName).file = "Task.exe"){ io.print("Task.exe已被拦截",processName) return true;//返回true拦截 } io.print(processName); return false;//返回false 正常访问 } ) io.print("钩子安装是否成功",rtn); //CopyRight http://emao.me winform.show() win.loopMessage();
namespace lsp; var path = ..io.exist("\lib\lsp\res\LSP.dll") : ..io.exist("\LSP.dll"); var dll = ..raw.loadDll(path); var _install = dll.api("install","bool(pointer)" ) uninstall = dll.api("uninstall","bool()" )
install = function(f){ var pCallBack = ..raw.tostdcall( function(...){ if(f){ return f(...); } },"bool(string,int,int,int,int,int)" ) return ( _install(pCallBack) ); }
/**intellisense(lsp) install() = InstallLSP uninstall() = UninstallLSP end intellisense**/
看懂了用的着就拿走,转载记得留个版权。
发表评论