Skip to content

sco_api.query_service

Any thread. SCO_OK: *out_vtable = the table of the service with this name, same major as min_version and at least as new. SCO_UNAVAILABLE: another major, or older. SCO_NOT_FOUND: none. *out_vtable is NULL unless SCO_OK. A plugin’s table goes away when it unloads: query when needed.

sco_result (*)(const char *, uint32_t, const void **)

Service index

Property Value
Symbol sco_api.query_service
Record ID sco-api-query-service
Service sco_api
Table sco_api
Version macro SCO_API_MAJOR/SCO_API_MINOR
Packed table version 65537
Since / availability size >= 104; 1.1
Complete member extent (x64 bytes) 104
Table size (x64 bytes) 128

Header source

sco_result (*query_service)(const char* name, uint32_t min_version, const void** out_vtable);
Any thread. SCO_OK: *out_vtable = the table of the service with this name, same major as min_version and at least as new. SCO_UNAVAILABLE: another major, or older. SCO_NOT_FOUND: none. *out_vtable is NULL unless SCO_OK. A plugin’s table goes away when it unloads: query when needed.

BAD_ARG NULL name/out; NOT_FOUND absent; UNAVAILABLE incompatible major/older minor; TOO_MANY handout-tracking allocation. *out NULL unless OK.

NOT_FOUND absent; UNAVAILABLE incompatible major/older minor

Returns borrowed provider table; never free. Host/game tables live through plugin lifetime. Native provider code remains mapped after handout, not necessarily its state. Handout tracking may allocate.

Any thread; reentrancy unspecified.

unspecified

unspecified

No cancellation. Native provider hot reload/unload during session refused after handout; shutdown still tears down state. Do not assume held state stays usable after withdrawal/crash.

Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.

Language Catalogue status Source evidence / wrapper tokens
c direct include/sco_api.h
(*query_service)
cpp typed-wrapper include/scosdk/service.hpp
const sco_result r = api->query_service(name, minVersion, &out);
csharp typed-wrapper sdk/csharp/Sco.Sdk/Services.cs
fixed (byte* n = Utf8.Z(name)) r = a->query_service(n, minVersion, &table);
lua restricted plugins/lua/sco_lua.c
s->api->query_service(SCO_STORAGE_NAME, SCO_STORAGE_VERSION_1_0, &t)

find service table This is a search phrase for the existing contract, not an additional API alias.

ABI pins prove layout, not semantic behavior or a live game session.