views:

47

answers:

1

I've run into a problem that's driving me crazy, hopefully someone will be able to shed some light on it. As part of my build process I have a separate .exe that updates the VersionInfo for the file. I literally use this on more than 20+ programs, but for some reason on one of them it is removing all the existing resource information from the exe. I actually trimmed it down and I can get the exact behavior by just calling:

if ((ResourceHandle = BeginUpdateResource(Target, FALSE)) != NULL) { EndUpdateResource(ResourceHandle, FALSE); }

I use the above as a simple example, but in my case I'm checking the return codes and everything is operating properly. If I run the same code against my 20 other apps, they are unaffected by it - but run it on this one and it removes the resource data.

I looked through the .rc file, removed chunks of it, rebuilt it every way I could think of, and the result is the same. I can also load it up in DevStudio, and it doesn't report that anything is corrupt, etc. The build process is exactly the same between all the apps (they're built via makefiles, so no magic happening in there either).

Has anyone else experienced this sort of behavior? It looks like other people of encountered it:

http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/2d0ea267-069f-453c-8659-0cc3c916cb14

But so far I haven't found a solution...

A: 

As part of my build process I programmatically edit the source code for the version number (in the resource source file), instead of editing the *.exe ... so I couldn't get that problem.

ChrisW
Not all of the programs I'm building are GUI, in fact a fair number are commandline and normally don't have RC files associated with them. I suppose I could look into changing my workflow to do some manipulation of the RC file directly - but ideally I'd like to figure out what's causing the problem and what I can do to avoid or identify it in the future.
Mark