This function will generate valid activation file for applications protected with any PC Guard family product.

Definition and parameters

extern "C" __declspec(dllexport) int __stdcall \
GenerateActivationFile(char* activation_code, char* serial, char* app_sign, char* pid, PUSER_INFO_DATA ui, PUPDATES_POLICY_DATA up, char* filename);

Parameter Description
activation_code Pointer to activation code string value.
serial Pointer to serial number string value.
app_sign Pointer to application signature string value.
pid Pointer to Program ID string value.
ui Pointer to USER_INFO_DATA structure (optional, ignored if NULL)
up Pointer to UPDATES_POLICY_DATA structure (optional, ignored if NULL)
filename Full path to output activation file.


activation_code, serialpid and app_sign parameters are mandatory. If serial number is not required, pass pointer (serial) to empty string.

User info (ui) and updates policy (up) parameters are optional. Use them if you need to update user info or/and updates policy for protected application.

Return values

If the function succeeds, valid activation file is generated and return value is STATUS_OK.

If the function fails, return value is on of the following error codes:


Full list of return codes is available here.