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...