Ok, I think the problem you're having is how the compiler handles string literals by default. Every sting constant such as your "Hello!" has to be stored in your .exe file. By default, I think, VC++ combines indentical string literals into one instance to save space. Most of the time, these are put into programs to be treated as constants. In your case, you're saying it's ok to modify the memory locations that hold "Hello!". Since the compiler combines all instances of "Hello!" into one, all pointers to it will point to the same block of memory. Change that memory and it's changed for all instances.
I think there's a compiler or linker flag to force code generation to not combine string literals but I couldn't find it when I looked. Maybe they did away with it since the last version I saw that had it and now you're stuck with what you're seeing.
One way around it would be to define "Hello!" once and copy it to a separate buffer each time you want to play with it.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
Firstly, it's far from clear what you mean by "loaded into a memory table". It sounds like your want to re-implement the loader. In general I'm not sure if this is possible from user mode. There's a lot more to getting a module into memory in a executable state then simply having the module in memory: relocating, recursively loading all dependent modules, resolving imports (building the Import Address Table, for example), etc... Even if you did do all these things (and more that I've forgotten) it's far from clear that "unusual" things, for example code that enumerated all loaded modules, would work.
I have my project set as a release, but of course when I run it through the IDE it runs in Debug mode.
If I run the program outside of VS2010 the app crashes when it is trying to get a COM for Common Item Dialog.
Depending on what you're looking for.. I have a copy of "Starting out with Games & Graphics in C++" and it's very nice, it uses the Dark GDK wizards which you can get from www.thegamecreators.com for free.
Last Visit: 31-Dec-99 19:00 Last Update: 4-Feb-23 16:09