jhattingh
asked on
How do I allow my exe to modify it's own resource?
I basically want to be able to modify a resource in my executable as a way of copy-protecting my programs. When the program first runs, I want it to modify a resource, giving it the serial number of the user's C: drive.
Is this possible? I know how to retrieve serial number - I only want to know how to modify "self".
Is this possible? I know how to retrieve serial number - I only want to know how to modify "self".
Hi!
Why resource ???
you can write serial id indirect into the EXE file just make sure where serial located in the exe and write nwe value to the founded offset
Why resource ???
you can write serial id indirect into the EXE file just make sure where serial located in the exe and write nwe value to the founded offset
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This is possible using e.g. 'UpdateReposurce()' (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/hh/winui/resource_2crp.asp) - see also http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/hh/winui/resource_05yr.asp ('Adding, Deleting, and Replacing Resources'). However, there are some restrictions:
Windows NT/2000 or later: Requires Windows NT 3.1 or later.
Windows 95/98/Me: Unsupported.