November 6th, 2008, 08:48 PM
Need a way to edit program's own file
I need a way to make a program work on only the first computer it is run on, it doesn't need to be very secure but it needs to work. The idea that I came up with is to have the program save the MAC Address (of the first computer it is run on) inside of its own EXE. And then from then on check to see if the MAC Address corresponds to the computer its on..
So I have a couple questions
1. How can I have a program edit its own file during execution. Is this possible? Are there workaround ways to do it?
2. How can I have the compiler tell me where, in the file, a certain piece of data was saved. I'm using GCC, though I could use Visual C++.
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!