--- title: "AAL2CINIT_APrepare" slug: "a3s-cppprg-aal2cinit-aprepare-4-0" updated: 2026-11-11T10:02:33Z published: 2026-11-11T10:02:33Z canonical: "docs.onespan.com/a3s-cppprg-aal2cinit-aprepare-4-0" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # AAL2CINIT_APrepare ## Function prototype ```cpp aat_int32 AAL2CINIT_APrepare(TCinitHandle* CHandle, aat_ascii* HeaderRecord, aat_ascii* InitKey); ``` ## Description This function is used to initialize the import process of a CINIT_A.DGP file. > This function is mentioned for compatibility reasons with previous releases. It is obsolete and should not be used anymore. Unlike with the DPX file, the application is responsible for all the I/O operations to the file. This function is called by passing it the CINIT_A.DGP HeaderRecord, which should be the first in the file, and the 14-digit InitKey that has been used to encrypt the file. If this key is successfully verified, the CHandle is populated for use by the AAL2CINIT_AProcess function. ## Parameters | Type | Name | Use | Description | | --- | --- | --- | --- | | TCinitHandle * | CHandle | I/O | Pointer to the handle used during the CINIT_A.DGP file import operation. This block must be passed to AAL2CINIT_AProcess. | | aat_ascii * | HeaderRecord | I | 64-byte CINIT_A.DGP file header record. This is normally the first record of the file, with 0 as the first character. | | aat_ascii * | InitKey | I | String of 14 hexadecimal digits. This is the CINIT_A.DGP file encryption key. | ## Return codes | Code | Meaning | Code | Meaning | | --- | --- | --- | --- | | 0 | Success | 506 | Invalid CINIT handle pointer | | 500 | Init key not verified | 507 | Invalid CINI HDR pointer | | 501 | Bad init key length | 508 | Invalid header record |