change variable value
-
Hi! I have a variable declared like this in my application:
int i = 2;
What I want to do is to change the value from 2 to 3 (with the help of another exe application) without recompiling... Well I have the file offset which is 5030 but I don't know how to change it! Can someone help me? Thank you very much for your answers in advance! Well... I am a beginner ... -
Hi! I have a variable declared like this in my application:
int i = 2;
What I want to do is to change the value from 2 to 3 (with the help of another exe application) without recompiling... Well I have the file offset which is 5030 but I don't know how to change it! Can someone help me? Thank you very much for your answers in advance! Well... I am a beginner ...You really don't want to be doing that. If your program needs a parameter, which another program must change, then there are a whole bunch of sensible ways to achieve that. A fairly good idea might be to use the registry.
#include <beer.h>
-
You really don't want to be doing that. If your program needs a parameter, which another program must change, then there are a whole bunch of sensible ways to achieve that. A fairly good idea might be to use the registry.
#include <beer.h>
yes I could use something like that or just append the variable values at the end of the exe and read them from there but I am making an installer and I want to use that for the password... I don't really understand what the file offset is... is it just a position or something like a pointer? Well... I am a beginner ...
-
yes I could use something like that or just append the variable values at the end of the exe and read them from there but I am making an installer and I want to use that for the password... I don't really understand what the file offset is... is it just a position or something like a pointer? Well... I am a beginner ...
The standard approach is to store the password value in encrypted form in an inifile or registry. When the program asks for the password, it encrypts the user's input and compare the encypted user's input with the encrypted password from registry. If they are equal, the user's password is correct. For encrypting, you should use SHA hashing algorithm. Try google for 'SHA C++ library'. Robert-Antonio Endless loop: see Loop, endless Loop, endless: see Endless loop
-
yes I could use something like that or just append the variable values at the end of the exe and read them from there but I am making an installer and I want to use that for the password... I don't really understand what the file offset is... is it just a position or something like a pointer? Well... I am a beginner ...
A much simpler way would be to store it in the file's resource table. See this article for ideas.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
A much simpler way would be to store it in the file's resource table. See this article for ideas.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen