From b8a7794a9ef87f1180822bdd3918b363d9e5b613 Mon Sep 17 00:00:00 2001 From: Guyliano Buyssens Date: Mon, 23 Nov 2026 15:02:33 +0000 Subject: [PATCH] Refused interfaces are logged: XGameRuntime objects and DirectStorage A title asking for an interface version XCL does not know got E_NOINTERFACE silently and asserted; the IID and the class are in the log now (as GameInput's and D3D12's already were). --- crates/xcl/src/hle/dstorage.rs | 8 ++++++++ crates/xcl/src/hle/xgameruntime/api.rs | 2 ++ 2 files changed, 10 insertions(+) diff --git a/crates/xcl/src/hle/dstorage.rs b/crates/xcl/src/hle/dstorage.rs index 12c9035..4287601 100644 --- a/crates/xcl/src/hle/dstorage.rs +++ b/crates/xcl/src/hle/dstorage.rs @@ -170,6 +170,14 @@ unsafe fn query(p: *mut c_void, own: &GUID, riid: *const GUID, out: *mut *mut c_ return S_OK; } *out = std::ptr::null_mut(); + // a newer DirectStorage interface version a title asks for: named, so its assert has a cause + if !riid.is_null() { + let (r, o) = (&*riid, own); + crate::xlog_warn!( + "DirectStorage: QueryInterface({:08x}-{:04x}-{:04x}-{:02x?}) on the object of {:08x}-{:04x}-{:04x} refused (E_NOINTERFACE)", + r.data1, r.data2, r.data3, r.data4, o.data1, o.data2, o.data3 + ); + } E_NOINTERFACE } diff --git a/crates/xcl/src/hle/xgameruntime/api.rs b/crates/xcl/src/hle/xgameruntime/api.rs index 70c3468..26977b2 100644 --- a/crates/xcl/src/hle/xgameruntime/api.rs +++ b/crates/xcl/src/hle/xgameruntime/api.rs @@ -372,6 +372,8 @@ unsafe extern "system" fn query_interface(this: *const Obj, iid: *const Guid, ou return S_OK; } *out = std::ptr::null_mut(); + // a title asserting on this (a newer interface version of the class?) ends without a trace otherwise + crate::xlog_warn!("XGameRuntime: {} QueryInterface({}) refused (E_NOINTERFACE) – an interface version XCL's GDK table does not know?", f.name, *iid); E_NOINTERFACE }