C++ Secure Section
From J2Play
We recommend the use of secure sections to make sure that the later levels of your games are completely inaccessible even if someone manages to remove the DRM wrappers without a valid key.
This is covered in the SoftwarePassport User Documentation under 'Secure Sections', but involves marking any code you would like to make inaccessible with SECUREBEGIN and SECUREEND as follows.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SecuredSections.h"
void main(void)
{
printf("This is a test program.\n");
SECUREBEGIN;
printf("This line will only be printed if the SECUREBEGIN group is active.\n");
SECUREEND;
}
This will set aside the code making it inaccessible except by users with a valid key.
