Change hard-coded variables from Outside
-
Hello, How can I change a hard-coded variable from another program with my program ? For example: Program A has this definition:
CString strTmp = "This is a Test";
somewhere in it's code. And now I want with my program to change this variable to "This is another Test". How could I realize this ? With best regards, Benedikt -
Hello, How can I change a hard-coded variable from another program with my program ? For example: Program A has this definition:
CString strTmp = "This is a Test";
somewhere in it's code. And now I want with my program to change this variable to "This is another Test". How could I realize this ? With best regards, BenediktYou can open the file (as binary) with Visual Studio and search for the string literal. You can't, however, make it any longer.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
-
Hello, How can I change a hard-coded variable from another program with my program ? For example: Program A has this definition:
CString strTmp = "This is a Test";
somewhere in it's code. And now I want with my program to change this variable to "This is another Test". How could I realize this ? With best regards, BenediktHello, First off one quick question ... with the simplicity of scripts why go thru all the trouble to change hard coded varibles? A simple text file and a text parser is like magic sometimes :) But as for changing hard coded variables, maybe putting the variable on its own thread and using a mutex would work. Or alternatively you could make one program take key input then use Shell Extensions to run that program inside another program and give it input from the second program. Just a couple of random, probably nonsensical ideas, hope that helps :) Jay