I am planning to store the license information of my app to the app itself. Is it possible to write to an EXE in Delphi without affecting its logical function? If yes, How? My colleague says that there are only specific parts of the exe that is writable. Is this true?
Why don't you store the license as a resource in your Delphi app rather than hack the EXE?
Example here: http://delphi.about.com/od/objectpascalide/a/embed_resources.htm
Take a look at http://sourceforge.net/projects/tponguard/
You'll find what you want here.
This An In-Depth Look into the Win32 Portable Executable File that will help you. thehackerslibrary.com . File Resource Management Library (.NET) that may work for you.
Create your license variable with start and stop tags. I don't know anything about Delphi programming but in psuedocode it would look like
var license = "$$$$"+"LICENSE DATA"+"$$$$";
You can open the executable in a hex editor and search for the $$$$ part and edit it directly or you can write a program that will overwrite the bit between the tags.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.