ktsangop 23 Junior Poster in Training
ktsangop 23 Junior Poster in Training

This is a very good tutorial for mfc dialog based application beginers
http://www.codeproject.com/Articles/589/A-Beginners-Guide-to-Dialog-Based-Applications-Par

It's a 15 minute read and once you complete it i am sure you will be able to create a dialog with a button that executes some code. Also how to parse input from textboxes.

You could use your existing ascii drawing inside a textbox to create the feel of visual interaction, but if you want to use real images you will have to dig a little deeper by reading something like this:

http://www.codeproject.com/Articles/356/Bitmap-Basics-A-GDI-tutorial

Hope that helped.

ralph.d.abernathy.1 commented: Wow thank you for those links! Real helpful. +0
ktsangop 23 Junior Poster in Training

You are correct. Forget about std library, it's c++ not c.
You can look here for a c library reference :
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/

You can look here too
http://www.cplusplus.com/
This is one of the most complete c++ reference websites which of course contains most if not all of C language functions.

All you need to know about is the string library <string.h> and file streams <stdio.h>

blackrainbowhu commented: thank you :) +0
ktsangop 23 Junior Poster in Training

Sorry i didn't make that clear.
The user is responsible of sending me the key via phone, sms or even email but this has nothing to do with the application. The machine on which the application runs could have no internet access.

I'll try to break it down.

Let's say you gave me a key number like 584663214796.
And this number contains a "hidden" information of how we both should compute the activation number. So i calculate it using my private app, and send it back to you.
You compare the number i sent you with your calculation and if they match.. licence is updated.

ktsangop 23 Junior Poster in Training

Hello everyone!
I want to add a licence expiration feature in my application (written in visual c++).
When the licence expires i would like my application to generate a random numerical key which will be sent to me by the user.

Using this key and a personal key-generator i would like to send back to the user an activation code.
The key/activation-code combination should not be stored anywhere in either sides. They must be as random as they can get.
The user should not need any kind of internet connectivity (my previous activation was web-based and i want to remove it).

What kind of algorithm can i use?
I would like some guidelines or any links to useful information if available.

I am not looking anything that is related on how i could "lock" my application with third party software or anything that has to do with hardware serial numbers etc...

Thanks in advance!

ktsangop 23 Junior Poster in Training

You can run your executable either at system shutdown or at user logoff using group policy editor. It works smoothly i use it all the time.

Type gpedit.msc at a command line prompt, and navigate either to :
computer settings-> windows settings -> scripts (startup / shutdown)
or
user settings-> windows settings -> scripts - >(logon / logoff)

There you can add a batch script or vbscript that simply executes your application.

If you application runs on the background and you want it to get notified when system is being terminated, then probably the only role of the script could be to notify your application (by p.e. writing something to a file).

Ancient Dragon commented: good info :) +17
Arbus commented: nice! +6
ktsangop 23 Junior Poster in Training

The more i C the less i see!
:D
Cool stuff... thanks!

Kareem Klas commented: Nice word joke. +0
ktsangop 23 Junior Poster in Training

You should start by reading about Hooks in MSDN.

http://msdn.microsoft.com/en-us/library/ms644959%28v=VS.85%29.aspx

There's no easy and universal way to create a keylogger. It all depends on what and how you want to do something...

Anyway, be also prepared to read about creating DLLs because that's the only way to create GLOBAL hooks. If your app is going to be invisible a global hook is mandatory.

And don't expect to get any help you if you want to create a virus or something...no offence...