Hi Mathias,
I'd like the CRC checker to either generate an event (to allow me to close the app or take whatever action I want) or to throw an exception where the only option is to close the program.
This would allow me to detect if someone was using a copy that had been patched, say, to circumvent licensing checks.
Any ideas?
Mark
Invalid CRC trap
The problem is that when madExcept detects that the CRC is incorrect, this might really be caused by a bit fault. In that case any further code you execute may result in real crashes. Because of that I've written the CRC as simple as possible.
Another problem is that the CRC check is done in the madExcept initialization. So this is done before any of your code is executed. As a result if you would call something like "RegisterCrcFaultCallback", that wouldn't work, because your call to such a function would be done after the CRC check is already executed.
So right now I think the easiest way for you would be to change madExcept.pas. Unfortunately you'd have to redo the change with every new madExcept version.
Another problem is that the CRC check is done in the madExcept initialization. So this is done before any of your code is executed. As a result if you would call something like "RegisterCrcFaultCallback", that wouldn't work, because your call to such a function would be done after the CRC check is already executed.
So right now I think the easiest way for you would be to change madExcept.pas. Unfortunately you'd have to redo the change with every new madExcept version.