Repository navigation
runtime/shims: implement XCRDAPI.dll!DStorageGetFactory stub factory - #7784
emirtugra-dag wants to merge 3 commits into
Conversation
|
AI-assisted review of In constexpr IID unsupported{}; // IID_NULL
void* result = nullptr;
const HRESULT hr = qi(factory, &unsupported, &result);
std::printf("IID_NULL: hr=%08lx same_factory=%d\n", static_cast<unsigned long>(hr), result == factory);
check(hr == E_NOINTERFACE && result == nullptr, "unsupported IID is refused");
if (SUCCEEDED(hr) && result == factory) release(factory);Build with The original |
|
Thanks for catching this and testing on Windows 11! Updated Re-verified locally with |
|
Re-tested A non-null unsupported IID still changes the interfaces available on an existing factory. The test first confirms that Insert this before void* acquired = nullptr;
void* queried = nullptr;
const HRESULT get_hr = get_factory(&kUnknownInterface, &acquired);
const HRESULT query_hr = qi(factory, &kUnknownInterface, &queried);
std::printf("unknown IID: get=%08lx query=%08lx same=%d\n",
static_cast<unsigned long>(get_hr), static_cast<unsigned long>(query_hr),
acquired == factory && queried == factory);
check(get_hr == E_NOINTERFACE && acquired == nullptr, "factory rejects unsupported IID");
check(query_hr == E_NOINTERFACE && queried == nullptr, "interface set stays fixed");
if (SUCCEEDED(query_hr)) release(queried);
if (SUCCEEDED(get_hr)) release(acquired);Build AI-assisted. |
|
Fixed in 2e537bc.
Re-tested on Windows 11 (
AI-assisted. |
|
AI-assisted recheck on Windows 11. Commit |
|
Tested 2e537bc merged onto main 867d922 (clean merge) on Windows 11 build 26300, MSVC 19.44, Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0,
Note for the coordinator: #8461 ( AI-assisted (Claude Code). No game files. |
|
Tested 2e537bc on Windows 11 Pro 10.0.26300, MSVC 14.51 (VS Build Tools 2026), Windows SDK 10.0.26100, NVIDIA GeForce RTX 4060 / 621.24, Khronos Vulkan headers via But it overlaps #4348, which is stop 5's fix in
So I'd keep #4348 as stop 5's fix and not land this one alongside it, or at least drop the AI-assisted (Claude Code). No game files. |
Claimed in the coordination issue as: unclaimed (Stop 5 in
docs/retail_boot_chain.md,XCRDAPI.dll!DStorageGetFactory)What and why
Implements
XCRDAPI.dll!DStorageGetFactory(Stop 5 indocs/retail_boot_chain.md) so the retail executable does not fail with a null factory pointer at startup:runtime/shims/xcrdapi.cpp: ImplementsDStorageGetFactory(const IID*, void**)returningS_OKwith a process-lifetimeStubDStorageFactoryCOM stub (64-slot vtable with atomicQueryInterface/AddRef/Releaserefcounting and one-time loggedE_NOTIMPLon slots3..63).runtime/shims/registry.cpp: Classifiesxcrdapi.dll!DStorageGetFactoryasReturnClass::HResult.runtime/CMakeLists.txt&scripts/build_runtime.ps1: Wiresshims/xcrdapi.cppintogta6rt, test targets, CTest (xcrdapi), and thecl.exefallback build.runtime/test/xcrdapi_test.cpp&runtime/test/unimplemented_policy_test.cpp: Adds C++ unit tests coveringowns_dll,library_loaderresolution, argument validation,IUnknownrefcounting, and vtable slots3..63.tests/test_xcrdapi_shim.py&docs/: Adds structural/registration tests and updatesdocs/retail_boot_chain.mdanddocs/runtime_imports.md.Tested
xcrdapi_test.exe: 22/22 checks passed.ctest(13 runtime/shim suites includingxcrdapi,unimplemented_policy,pe_loader): 13/13 passed.test_xcrdapi_shim.py,test_ci_registration.py,test_ctest_registration.py,test_exe_checklist.py) andscripts/check_no_game_data.py: all passed.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed.