Sorry for the late reply. I don't check this account very often.

Quote Originally Posted by cAPS lOCK View Post
First of all, thanks abcba, that's an amazing piece of work, pure wizardry. And thanks a lot for making the source public, allowing us mere mortals a glimpse of all the magic behind the curtain :-)
You're most welcome, and thanks for the compliment

Quote Originally Posted by cAPS lOCK View Post
I'm trying to get the project to build. I've installed the needed DirectX SDK (the August 07 version), the Detours package (version 2.1), and the current version of the Windows SDK for Vista. Right now the dwmapi, Loader, and MFPlat projects will build nicely, however the mf and the Wow projects won't budge.
Hmm. I did forget to tell about an issue in the mf project. In my first stab at implementing everything I thought was needed, I discovered that the version of IMFPresentationDescriptor used by H2V was different from the one in the Windows SDK (6.0.5383.1.1) which I used. This manifested itself as certain calls beeing off, ie. it was making ::GetMetadata calls with obviously invalid arguments. The quick solution was to remove the function from the SDK headers. A cleaner solution would have been to create a new interface and rename all references, but hacking the headers was less work.
Also, regarding detours. Since the 2.1 version went commercial, they instated a requirement that you also load a dummy DLL (detoured.dll) whenever you use detours. Which I find redundant. So I used the elder version, 1.5. The API's haven't changed (IIRC) apart from the requirement of loading the dummy DLL. So if you can't find the old version you'll have to take that into consideration.

Quote Originally Posted by cAPS lOCK View Post
Creating an CMFTopology instance in line 40 of mf.cpp generates the error msg "error C2259: 'CMFTopology' : cannot instantiate abstract class". The same error pops up in line 68 of MMDevice.cpp when creating the CAudioSessionManager instance. I'm new to C++ so it may be something trivial, but none of the classes look abstract to me (?)
The wrapper classes such as CMFTopology and CAudioSessionManager inherit from interfaces (IMFTopology and IAudioSessionManager respectively) defined in the Windows SDK. The only reason why either class would be abstract, is if the interfaces have changed. If you look at the compiler error in the output view, it should tell you which members makes the class abstract.
That being the case, you've got the choice of hacking the headers or creating your own interfaces. If you're planning on using any of these interfaces in your own software, then I would strongly advice against hacking the headers.

Quote Originally Posted by cAPS lOCK View Post
The compiler also complains about the "FireEvent(MESessionTopologyReady)" in line 133 of MFMediaSession.cpp, claiming that the MESessionTopologyReady identifier hasn't been declared.
Apparently that enum has been removed from the SDK: http://forums.microsoft.com/MSDN/Sho...16582&SiteID=1
The link provides an alternative definition of the removed values.

Quote Originally Posted by cAPS lOCK View Post
I'm beginning to suspect that the reason for both errors is that MS has updated the Windows SDK since you released the sources. Does that sound plausible or am I overlooking something obvious? - if I am, then allow me to apologize in advance for bugging you :-)
It looks like they've been doing some compatibility breaking changes to the SDK. The easiest thing might be to track down 6.0.5383.1.1.WindowsSDK_Vista_idw.DVD.Rel.img unless you're up for creating your own set of interfaces and typedefs


There's probably one more thing I should mention. If you're planning to have a go at Live then there's something you need to know. Once I had the game starting up. It would randomly crash, without affecting the operation of the game itself. I tracked this down to being a thread in the Live component, making invalid reads/writes to memory. However since it didn't have any effect on the game itself, I decided to catch the exception, using an unhandled exception filter (WowUnhandledExceptionFilter) and skip the faulting instruction upon failure. I can't say what implications this will have on the operation of Live, but I would think it has some significance.

Furthermore there's a fix for the Gravemind level glitch by grue697, which you could integrate into the source code.
Apparently ReadFile on Vista is capable of doing larger reads than previous versions. This causes the ReadFile API to fail on XP.