Using Secured Section Markers With C or C++
Previous Top Next
C (and by extension C++) was designed for low-level access, making it very easy to "mark" a section. Simply copy the SecuredSections.h file (provided with Armadillo, in the SecuredSections\C directory under the main Armadillo directory) to your "include" directory (or your program directory, if you wish), include it, and use the macros that it defines (SECUREBEGIN and SECUREEND) around the sections of code that you want to mark. For example, in the following console-mode program, the first and last lines will always be printed, but the middle ones will only appear if the appropriate SECUREBEGIN group is enabled:
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;
SECUREBEGIN_A;
printf("This line is only active when the SECUREBEGIN_A group is.\n");
SECUREEND;
SECUREBEGIN;
printf("Notice that you can have multiple secured sections in each group!\n");
SECUREEND;
printf("End of test!\n");
};
You can also use SECUREBEGIN_A, SECUREBEGIN_B, or SECUREBEGIN_C in place of SECUREBEGIN. These mark the different "groups" of sections. You can use SECUREEND on any and all of these, although we define SECUREEND_A etceteras as well.
em...actually i also interested in knowing how to inject the secure section to the exe...without include the header of secure section to the code like aerror post..
i would like to know how to inject secure section to compiled exe.
btw anyone how to fix nanomites of armadillo? .. i read ricardo..but not quite understand...