I have an application built in C++ Builder 2010. Some config values are stored in the registry and being a 32 bit application some values are saved under Wow6432Node key.
This has worked like clockworks no matter if I run the application on WinXP, Win7, Win8... 32 or 64 bit. The application is built by a Windows 7 64 bit build agent under TeamCity.
Then all of a sudden it just stopped working. No changes to the code loading registry keys had been done. After digging around I got it to work by forcing Access of the Registry object to be KEY_WOW64_32KEY.
But that seems quite cumbersome to have to do everywhere. First try to read and if it doesn't find a value try to check in the wow key. I have looked over all code changes since it last worked and nothing touches the registry loading and I have tried reverting .cbproj files if some strange setting got enabled by mistake but to no good.
Also, building locally on a dev machine which is also a Win 7 64 bit machine it works fine.
What on earth could have happened? It's like magic :)