Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

security

Status
Not open for further replies.

Maurader

Technical User
May 8, 2002
59
CA
I've written a MFC program in VC++, is there a way to add some security feature so that my program will only run on the computer that i compilied my program on? ie. some function that will read the bios information, compile it and store it, and when my program rums, check the bios of the comptuer that it is running on and compare the two?

Thanks
 
Microsoft seems to know how to do this, just check the latest versions of office... ;-)

Anyway, there are two things I can think of:

1) MAC address. If the computer you compiled it on has a network card, you can use the MAC address of the card as a unique identifier, since no two network cards anywhere will have the same MAC address.

2) If there's no network card, you can use the serial number of the primary hard drive installed in the computer. While this has a slight chance of not being unique, the chances are so small that maybe your program will run on some computer in Tanzania. It's a good alternative to the MAC address.
 
is there a way to read these ID's at compile time?
 
so then do i need to hard code the ID's? and i have to re-hard code everytime i move to another ocmputer?
 
sort of...except that I'm hoping that when I move my code to another computer, and i recompile on that computer, a C++ function will read the computer's ID, instead of me having to find out manualy the ID and code it as some kind of string literal..but then, there's also the problem of how to read the computer's ID everytime my computer runs to compare it to what is "correct"? I am not a very expereince C programmer, and all help and patience is appreciated!

Thanks!
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top