IXGameImpl3 : IXGameImpl2 : IXGameImpl (xgameruntime include/xgame.idl), slots
3-5: XGameGetXboxTitleId gives MicrosoftGame.Config's <TitleId> (E_FAIL without
one, E_INVALIDARG for a null pointer), void XLaunchNewGame is logged and
returns, XLaunchRestartOnCrash succeeds with nothing registered. A retail Gen9
title asks QueryApiImpl for this class (Freminet/ScarlettX's observation).
The config reader is shared with XPackageGetUserLocale. The two tests that used
XGameImpl's id as their example of an unserved class now use XGameSaveImpl's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Handle IXNetworkingImpl2 query for class {37e56907-2f10-41e8-b72f-36edb185331a}.
- Return offline answers matching console behavior without network:
* Connectivity hint: networkInitialized=true, level=None (1), cost=Unknown (0).
* Port query and URL security queries fail with ERROR_NETWORK_UNREACHABLE.
* Async queries complete through XAsync with ERROR_NETWORK_UNREACHABLE.
* Correct ABI parameter order for AsyncResult:
(async, bufferByteCount, bufferByteCountUsed*, buffer*, information**).
* VerifyServerCertificate fails offline with ERROR_NETWORK_UNREACHABLE.
* Registration tokens are tracked without firing offline.
* IXNetworkingImpl2 extension methods return E_NOTIMPL.
- Update docs and tests in xgameruntime_test and tiny_gdk_load.
A GDK title reaches XTaskQueue/XAsync/XThread/XError through
xgameruntime.lib thunks, not named imports: QueryApiImpl(class, class),
one vtable slot with `this` first, then Release. QueryApiImpl refused
every class, so none of those calls could work.
The slot order is xgameruntime-docs' Layout list after IUnknown, and is
measured: the thunks linked into the package's libHttpClient.GDK.dll and
XCurl.dll (disassembled, not run) call IXThreadingImpl slots 3-7 and 9-30
and IXErrorImpl slot 3, each with the argument shape of the documented
function at that position (docs/runtime_imports.md, "Class layouts,
measured").
- XThreadingImpl: 28 slots forwarded to third_party/xtaskqueue (the same
code the named exports use), a per-thread time-sensitive flag, and the
two private slots (XAsyncBeginAlloc, XTaskQueueIsEmpty) logged once.
- XErrorImpl: XErrorReport (the docs' "_unknown_" slot; HRESULT + string)
logs and calls the XErrorSetCallback callback; XErrorSetOptions is S_OK.
- Process-wide singletons; QueryInterface answers IUnknown and the class.
- xgameruntime_test drives both slot by slot; tiny_gdk_load (under
gta6rt --run) creates and closes a queue through slots 12 and 17.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1384 made the loader answer LoadLibrary/GetProcAddress for shim-owned modules, because the package's GDK
modules load xgameruntime.dll at run time instead of importing it. Only a registry-level unit test covered
it. tiny_gdk_load.exe has no xgameruntime.dll import and does what xgameruntime.lib's thunks do:
LoadLibraryW, GetProcAddress of the five entry points, InitializeApiImplEx2, QueryApiImpl for XThreadingImpl
and UninitializeApiImpl. ctest run_tiny_gdk_load runs it under gta6rt --run, so its own kernel32 imports go
through the loader's binding, and checks the verdict from outside as run_tiny_async does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>