Are you compiling for 64 bit? Then you have a problem. A 64 bit version is known to be flawed.
Anyway, such old software is not really relevant anymore.
It is extremely easy to create a patch.
Basically the easiest way is to create a diff between full version and demo version and that works all the time:
Onguard does not leave out code....and where it tries to, the above circumvents this.
To a hacker, it is therefor useless. I used to use OllyDbg to determine what OnGuard does many moons ago and, for sure even the other possibilities are worthless.
Best way to circumvent this is simply to leave out code...(save file etc) and even then the patch option will work.