After some futher investigation, we found it was a problem with data structure alignment. In VS options the Struct Member Alignment was set to 4 bytes, while a #pragma pack 2 was present in one of the source files.
Strange enough, everything worked under VS6, the porting to VS2012 made this issue come out.