spruceroot: Works wonderfully. Thanks so much. I'm a programmer and even though I have little experience with graphics programming I'm very interested to know how you created these custom dlls. Also, what happened with anniversary update that broke the first dll?
moranms: Great, glad it's working.
The graphics (ddraw.dll) are all based off of the ddhack project (
http://sol.gfxile.net/ddhack/). I used that as the shell and incorporated Direct2D (DX 11.1) calls for rendering (and made a good amount of modifications to get Heroes2 working with ddhack).
The audio is based off of ogg-winmm (
https://github.com/hifi-unmaintained/ogg-winmm) with additional tweaks to properly resume the CD audio where it last left off.
In both cases, the general idea is to produce DLL's with the same exported functions as the standard Windows copies. Doing so allows you to redirect certain functions to your own logic (known as DLL wrapping/intercepting/redirecting). Win10 Anniversary introduces two issues. First, for the audio, the standard winmm.dll was updated with additional exported functions. Since my copy used to redirect calls was now out of sync with the actual winmm.dll, it no longer worked. Instead of reworking my winmm.dll to match the new standard winmm.dll, I took a different route - DLL hooking. I let Heroes load the standard winmm, then "hook", or replace, some of the function calls to the standard library with my own. So instead of pretending to be the actual winmm.dll, we now just overwrite a few pointers to redirect the standard function calls to the new oggwinmm.dll.
For ddraw.dll, Win10 seemingly made a change to a specific Direct2D setting I used for rendering. Whereas before the Anniversary update my rendering setting was happily accepted, post update it would throw a "not supported" exception. Simply had to tweak that to an alternate setting and it worked again.
Very interesting. Thanks again.