| ActivePatch Developer's Guide - Initialization | ||
|
Before creating a patch file, we need to have two different versions of the same file, with one being the reference (original) version and the other the updated version. For the purposes of these examples, a moderately large Microsoft Access database, with approximately 10,000 records, will be used. Of course, any type of file can be used, however the specifics in terms of the compression ratio will differ from file to file. The reference version of the file will be named house1.mdb, and the modified version of the file will be named house2.mdb. The modified version of the database has had several records removed and added. The size of the two database files are approximately 1.3 Mb each, with a compressed size of approximately 450 Kb. Using the ActivePatch library, the first step that needs to be performed is initialization. This is done by calling the InitActivePatch function, passing the license key generated during the installation and registration of the product. The code for this could simply be written as: if (InitActivePatch(APATCH_LICENSE_KEY, 0L) == FALSE)
{
// Unable to initialize the ActivePatch library
return;
}
|
||