Invalid CRC trap

delphi package - automated exception handling
Post Reply
Markham
Posts: 26
Joined: Wed Nov 02, 2005 11:46 am

Invalid CRC trap

Post by Markham »

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
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

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.
Markham
Posts: 26
Joined: Wed Nov 02, 2005 11:46 am

Post by Markham »

OK thanks, Mathias.


Mark
Post Reply