C ++ visual studio 2010 exe ​​in get rebased resource?

Has anyone noticed that if you import exe as a resource, it gets reinstalled and it also seems that its PE header is being rebuilt?

This is sometimes annoying. Does anyone know how to disable reboot !?

steps to play in C ++:

1) compile the world hi and manually set its base address (in properties) to say 0x1000000

2) make a second project and incorporate the hi world into resources. Also manually set your base address as above.

3) build a second project

4) extract exe from resources and check it with the Pe editor! he returns to 0x400000. Why?

+8
c ++ rebase visual-studio-2010
source share
2 answers

How do you include exe as a resource in a second project?

The use of these parameters determines:

#define BINFILE 222 #define IDR_MYFILE 101 

If I reference the executable in my .rc file, pointing to the source file, for example:

 IDR_MYFILE BINFILE "S:\\mysource\\t1\\Release\\t1.exe" 

Then, after extraction, my built-in EXE resource is not reinstalled, but it supports what I created it with.

+1
source share

You might be interested in a binary builder that will hide your exe file as a const unsigned char [] array. Thus, VisualStudio will not be able to look into your resources.

For example, this: http://sourceforge.net/projects/juce/files/juce/1.52/prebuilt%20binaries/BinaryBuilder.exe/download

0
source share

All Articles