Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions runtime/shims/registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ std::vector<Lookup> g_lookups;
// xaudio2_9.dll XAudio2Create: HRESULT (learn.microsoft.com/windows/win32/api/xaudio2/
// xaudio2_9redist.dll nf-xaudio2-xaudio2create). xaudio2_9.dll is the console name (docs/d3d12_vulkan.md §7).
// dstorage.dll DStorageGetFactory: HRESULT (learn.microsoft.com/windows/win32/api/dstorage/
// dstorage_xs.dll nf-dstorage-dstoragegetfactory). dstorage_xs.dll is the console name.
// dstorage_xs.dll nf-dstorage-dstoragegetfactory). dstorage_xs.dll is the console name and XCRDAPI.dll the
// xcrdapi.dll import library the retail executable names it from (docs/runtime_imports.md, the RT-5
// table), so the same class follows the name into that library.
const char* const kNotHResult[] = {
"XAsyncCancel", "XAsyncComplete",
"XTaskQueueCloseHandle", "XTaskQueueDispatch", "XTaskQueueGetCurrentProcessTaskQueue",
Expand Down Expand Up @@ -111,7 +113,7 @@ ReturnClass classify(const std::string& dll, const std::string& name) {
if (name == "XAudio2Create") return ReturnClass::HResult;
} else if (dll == "gameinput.dll") {
if (name == "GameInputCreate") return ReturnClass::HResult;
} else if (dll == "dstorage.dll" || dll == "dstorage_xs.dll") {
} else if (dll == "dstorage.dll" || dll == "dstorage_xs.dll" || dll == "xcrdapi.dll") {
if (name == "DStorageGetFactory") return ReturnClass::HResult;
} else if (dll == "xgameruntime.dll") {
if (name == "XGameRuntimeInitialize" || name == "XGameEventWrite") return ReturnClass::HResult;
Expand Down
3 changes: 3 additions & 0 deletions runtime/test/unimplemented_policy_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ void test_classification() {
check(cls("gameinput.dll", "GameInputCreate") == ReturnClass::HResult, "GameInputCreate is hresult");
check(cls("dstorage_xs.dll", "DStorageGetFactory") == ReturnClass::HResult,
"the console dstorage name is hresult");
check(cls("XCRDAPI.dll", "DStorageGetFactory") == ReturnClass::HResult,
"the import library the retail executable uses names it hresult too");
check(cls("xcrdapi.dll", "XMemAlloc") == ReturnClass::Other, "only that name in xcrdapi.dll is hresult");
check(cls("xg_xs.dll", "XGCreateTexture2DComputer") == ReturnClass::Other, "unmeasured xg_xs import is other");
check(cls("acphal.dll", "AcpHalCreate") == ReturnClass::Other, "unmeasured acphal import is other");
check(cls("xgameruntime.dll", "XGameRuntimeInitialize") == ReturnClass::HResult, "XGameRuntimeInitialize");
Expand Down
Loading