SDK Compatibility
The original targeted the VS2012/Win8 SDK; the reconstruction builds against VS2022 /
Windows SDK 10.0.26100.0. These are the fixes that made that possible — reproduced from
ROADMAP.md. Don't undo them; the removed APIs will not come back.
Replaced or stubbed APIs
| Original (VS2012/Win8 SDK) | Fix applied (VS2022/Win10 SDK) |
|---|---|
d3dx11.h / D3DX11 effect API | Stub: HMREngine/d3dx11compat.h/.cpp (returns E_NOTIMPL for unused paths) |
d3dx9.h / d3dx9.lib | Removed from all targets |
d3dcompiler_46.lib | Renamed to d3dcompiler.lib |
dxva2.h DXVA2 video-processor APIs | Stub: HMRAVSource/dxva2stubs.cpp + stub interface in pch.h |
mferror.lib | Removed (MF error codes live in headers) |
MF_ENABLE_HARDWARE_TRANSFORMS | Removed (not in Win10 SDK) |
INTERNET_OPTION_ENABLE_FEATURE | Removed (not in Win10 SDK enum) |
uiribbon.lib / IID_IUICommandHandler | GUID manually defined |
MF_OBJECT_UNKNOWN | Defined as ((MF_OBJECT_TYPE)0) |
XmlWriterProperty_ProcessNamespaces | Defined as ((XmlWriterProperty)1) |
IXmlReader::GetAttribute | Replaced with MoveToAttributeByName + GetValue |
winmm.h | Replaced with mmsystem.h |
The 23 known gotchas
Lessons learned during the build-fix passes (full detail in ROADMAP.md):
winmm.hdoes NOT exist in SDK 10.0.26100.0 — usemmsystem.hIAtlStringMgris in<atlstr.h>, not<atlbase.h>- ATL 14+ defines
BaseAtlThrownatively CAtlArraycopy constructor is private — use.Copy()CComObject<T>does NOT expose T's members through->- D3DX11 is completely removed — must use the stub
CComPtr<T>requiresAddRef/Release— not for non-COM types- Circular includes broken by extracting enums into a separate header
RIBBON_APImacro was never defined — added toexports.hATL::CStringMapdoes NOT exist — usestd::mapIXmlReader::GetAttributedoes NOT exist — useMoveToAttributeByName+GetValue- MF enums removed from Win10 SDK
IDXVA2VideoProcessorinterface removedDrawTextLayouttakes 3 or 4 args (NOTD2D1_RECT_Fas 4th)_itow_srequires 4 args (value, buf, bufSize, radix)WriteEndElement()/WriteEndDocument()take 0 args- Circular include fixed by heap-allocating
ProjectTimeline - Forward-declared structs must be moved INTO the namespace in headers
DEFINE_STUB_TRANSITIONmacroL##stringId— remove theL##prefixmferror.libdoes not exist in the Win10 SDKGdiplus::Graphics::DrawImagetakesGdiplus::Image*, notconst Bitmap*- ATL
BEGIN_COM_MAP/COM_INTERFACE_ENTRY(IUnknown)fails with MSVC 14.44 — useCOM_INTERFACE_ENTRY_IID(IID_IUnknown, ClassName) CComQIPtr<IUnknown>has a template specialization conflict in MSVC 14.44 — useCComPtr<IUnknown>
Version macros
From src/common.h — reference these, never hardcode elsewhere:
WMMR_VERSION_MAJOR = 16
WMMR_VERSION_MINOR = 4
WMMR_VERSION_BUILD = 3528
WMMR_VERSION_REVISION = 331
WMMR_VERSION_STRING = "16.4.3528.331"