Commit Graph

4 Commits

Author SHA1 Message Date
f0c95d4711 xgameruntime: serve XNetworkingImpl offline through QueryApiImpl
- 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.
2026-11-22 22:11:48 +05:30
5f5d6d1949 xgameruntime: serve XNetworkingImpl (IXNetworkingImpl2) through QueryApiImpl
- QueryApiImpl hands out XNetworkingImpl (IXNetworkingImpl2, slots 3-20)
  for its class GUID {37e56907-2f10-41e8-b72f-36edb185331a}.
- Serves the slots XCurl.dll calls:
  * Slot 15: XNetworkingGetConnectivityHint reports an initialized network
    with unrestricted internet access offline.
  * Slot 14: XNetworkingVerifyServerCertificate returns S_OK.
  * Slots 16 & 17: XNetworkingRegisterConnectivityHintChanged and
    XNetworkingUnregisterConnectivityHintChanged manage registration tokens.
  * Slots 11-13: Async UTF-16 security information query stubs.
- Updated docs/runtime_imports.md layout table.
- Extended runtime/test/xgameruntime_test.cpp and tiny_gdk_load.cpp
  to verify XNetworkingImpl resolution and slot execution.
2026-11-22 21:28:40 +05:30
c88423448e xgameruntime: serve XThreadingImpl and XErrorImpl through QueryApiImpl
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>
2026-11-22 14:46:09 +00:00
eef61a04c0 test: a mapped program reaches xgameruntime.dll through LoadLibraryW, as GDK titles do
#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>
2026-11-22 11:53:47 +00:00