You would not be able to compile a .dll compatible with the original GOG version unless you compile the code with a version of Visual Studio that is the same as what the rest of the GOG version was compiled with, which is probably a Visual Studio version prior to year 2006. You would have to compile the complete set of source code with whatever Visual Studio version is available from Microsoft today, then you would have to replace the GOG version with all the new compiled .dll modules and .exe.