handleexceptions.via
来自「一个用VB写的很好的编译器,功能超好,不过就是代码有点多,是进一步学习编译的好」· VIA 代码 · 共 37 行
VIA
37 行
// HandleExceptions.lnl
application PE GUI entry main;
include "Windows.inc";
type SYSTEM_INFO {
dword dwOemID;
dword dwPageSize;
dword lpMinimumApplicationAddress;
dword lpMaximumApplicationAddress;
dword dwActiveProcessorMask;
dword dwNumberOfProcessors;
dword dwProcessorType;
dword dwAllocationGranularity;
dword dwReserved;
}
SYSTEM_INFO SI;
string buffer[256];
dword temp=200;
frame ExceptionFilter(dword a,dword b);
Format(buffer,"catched exception.. %d; %d\nDo you wan't to continue?",a,b);
if(MessageBox(0,buffer,"Error..",$24)=6) {
MessageBox(0,"program is running again","Handled..",$20);
temp = @SI;
main();
}
end;
frame main();
SetUnhandledExceptionFilter(@ExceptionFilter.Address);
GetSystemInfo(temp);
MessageBox(0,"I'll never come here..","System.Info",0);
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?