*************** CRCcomp version 1.0 ******************
***************   RUSSIA May,2000   ******************
*************** Alexander Rodigin ********************
******************************************************
1-What CRCcomp is?
It's a Delphi component that you can install in the 
IDE and protect executable files with CRC16 code.
***
2-Why files do need protection?
Since there are a lot of tools allowing to modify your
programm resources an experienced user can change the
icons, strings, dialogs appearance etc. Also there
is always a possibility that a file may be corrupted
during transfer to a user.  With CRC you can handle
both these cases and a rare chance of a virus attack,
when exe will also be modified.
***
3-How files can be protected?
Not files, rather users. You can places a CRCcomp onto
the form and every time the program starts, the CRC
will be checked and a result reported to you through
OnCRCcheck event that you can handle. Then the user
may be informed that a file is not what it was before
and the program may be terminated. Unless the user
gets an original file she won't be able to use your
application and blame you for the bugs you are not
responsible for.
***
4-How to use the CRCcomp?
After unzipping CRC.zip copy files into ~Delphi\CRC
directory. After that select CRCcomp.pas through 
Component|InstallComponent ...
The CRCcomp will be registered and you'll be able to
use it just like any component. Place it onto the form
and rightclick it then select UpdateCRC and a dialog
will appear to help you to write the CRC code to the
current project executable (the project must be already
compiled).
When the program starts CRCcomp launchs an additional
thread that check the CRC at the background so your
application continues to load. When the check is done
an OnCRCcheck event is triggered. Your responce to it
is defined in OnCRCcheck event handler: usually you
retrieve the CRC code with CRCcode property of the
CRCcomp and then decide what to do:
case CRCcode of
  {-6}crcUnknownError=ShowMessage('UnknownError');
  {-5}crcCodeInvalid =ShowMessage('CodeInvalid');
  {-3}crcNoFileAccess=ShowMessage('NoFileAccess');
  {-2}crcTwiceFound  =ShowMessage('TwiceFound');
  {-1}crcMarkNotFound=ShowMessage('MarkNotFound');
  else ShowMessage('CRC is OK!');
end;
The meaning of the crc constants :
  crcCodeInvalid -CRC stored in the file does not
                  match the CRC of the file any more.
                  That is, the file is modified.
  crcTwiceFound  -The CRC mark was found twice so
                  it's imposible to decide which
                  one is correct. Normally you won't
                  receive this result because you'll
                  be warned in the IDE.
  crcMarkNotFound-This is an impossible result if a
                  CRCcomp placed onto the form and
                  the executable uncorrupted;
You may use a simpler construction:
if CRCcode>=0 then ShowMessage('CRC is OK!');
***
5-Do not forget
to update CRC EVERY time you recompile the project or
better place a CRCcomp just befor the final release.

****************** THE END ***************************

