Skip to content

sco_content_v1.read

Copies exact immutable startup bytes; no added NUL. Size handshake: capacity in, written on OK, needed on TOO_MANY. NULL out requires zero capacity; empty file is OK/0. Only TOO_MANY changes size on failure; no failed call writes bytes.

sco_result (*)(sco_plugin *, uint64_t, void *, uint32_t *)

Service index

Property Value
Symbol sco_content_v1.read
Record ID sco-content-v1-read
Service sco.content
Table sco_content_v1
Version macro SCO_CONTENT_VERSION_1_0
Packed table version 65536
Since / availability size >= 24; 1.0
Complete member extent (x64 bytes) 24
Table size (x64 bytes) 24

Header source

sco_result (*read)(sco_plugin* self, uint64_t id, void* out, uint32_t* inout_size);
Copies exact immutable startup bytes; no added NUL. Size handshake: capacity in, written on OK, needed on TOO_MANY. NULL out requires zero capacity; empty file is OK/0. Only TOO_MANY changes size on failure; no failed call writes bytes.

Query NOT_FOUND when absent; UNAVAILABLE when stopped/terminal shutdown; WRONG_THREAD off game thread; BAD_ARG invalid/released self or invalid buffer/kind; NOT_FOUND ordinal end or unknown/stale ID; read TOO_MANY reports needed bytes.

Query NOT_FOUND when service absent; no game capability required.

Caller-owned copied records/bytes; host owns bounded startup snapshot. No paths, borrowed content pointers or allocation transfer.

Game thread only; synchronous memory copies, no callouts or file IO.

No callbacks.

No callouts; callable from a game-thread consumer callback while runtime admission is open.

No cancel or per-owner resource; host Stop clears snapshot and invalidates IDs. Table storage is process-lifetime; packs require restart.

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_content.h
(*read)
cpp typed-wrapper include/scosdk/content.hpp
table_->read(
csharp unsupported docs/design/content-access.md
no C#/Lua binding
lua unsupported docs/design/content-access.md
no C#/Lua binding

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