Page 1 of 1

Help with Key Generation / user input with easyce (please)

PostPosted: Jan 22, 2003 @ 8:25am
by brendan
Hi everyone, I'm just about tearing my hair out....

For my current game I'd like to have an input box pop up allowing the user to enter the registration code, if they have one, otherwise they can hit "demo", and continue to play the demo version....

I've managed to look at easyce, and workout that the input should most likly go before the GXOpenDisplay function etc.... and the App goes full screen....

so what I wanted to call before that is some code that allows a user to input 2, 5 digit alpha-numeric numbers (one 10 digit code).... check it etc... now I have not (dare I say it) ever written an code related to keyboard input or combo boxes in c++, I've looked at the basic messagebox() API, but I'm stuffed if I can work out how to get the 2, 5 digit numbers from the user, some help would be really really helpful!

assumeing I have 2 char* vars key1 and key2,

could someone give me an outline for a function that gets the 2 keys from the user! returns a 1 for keys ok... or 0 for not etc.... I'm sure I'd be fine with the "checking, writing them out etc", as for the input.....

e.g
int register_keys()

-thanks, I know to some of you this is not a difficult task....

and please dont start on the returning 1 on being a bad thing for decoding warez wise.... yes I know....

:-)

PostPosted: Jan 23, 2003 @ 1:43am
by draklava
Brendan - you might not want to use a MessageBox or any published API function for getting data input. That makes an easy hook to look for in the disassembler.

I know you've mentioned before that you are not looking to do a super unbreakable copy protection scheme but that is one of the first things people look for and is very easy thing to not do.

Instead of relying on the MS way of doing things - you are probably better off rolling your own input mechanism complete with writing your own software keyboard - there is some info on this in the pocketFrog forum



this makes it harder for the crackers and you don't have to tear your hair out thinking about how to pop up a window on top of EasyCE :p

also - along the security lines... you probably want to stay away from using strcmp type functions - again - write your own string compare routines for determining if they match and keep in mind that this is where your copy protection is most vulnerable!

<edit>
heh - i just got to the bottom about not wanting a warez lecture but doing it your own way gets around the EasyCE pop up problem so leave it at that ;-)

PostPosted: Jan 23, 2003 @ 12:05pm
by brendan
Thanks, Thats the way I have gone, my own basic input method via a graphic keyboard etc.... the "windows" way, was just a big pain in the butt!

As for the strings I'm converting to other "formats" and manipulating from there!

I'll get around to learn windows API stuff one day... maybe....ahhh, maybe not lol

-Brendan