Skip to content

sco_api.register_raw

Any thread. Registers fn under name (“<plugin id>.<name>”, the command name rule), gated on capability (NULL: none). Only fn and ctx are borrowed, until this plugin unloads. SCO_BAD_ARG: a bad or taken name.

sco_result (*)(sco_plugin *, const char *, const char *, sco_raw_fn, void *)

Service index

Property Value
Symbol sco_api.register_raw
Record ID sco-api-register-raw
Service sco_api
Table sco_api
Version macro SCO_API_MAJOR/SCO_API_MINOR
Packed table version 65537
Since / availability size &gt;= 128; 1.1
Complete member extent (x64 bytes) 128
Table size (x64 bytes) 128

Header source

sco_result (*register_raw)(sco_plugin* self, const char* name, const char* capability, sco_raw_fn fn, void* ctx);
Any thread. Registers fn under name (“<plugin id>.<name>”, the command name rule), gated on capability (NULL: none). Only fn and ctx are borrowed, until this plugin unloads. SCO_BAD_ARG: a bad or taken name.

BAD_ARG invalid/released self, NULL fn, bad/taken/out-of-prefix name or capability syntax; TOO_MANY raw registry capacity/allocation or 1024 successful wrapper registrations over process lifetime. Missing capability gates invocation, not registration.

Missing capability gates invocation, not registration.

Name/capability copied; fn/ctx borrowed until unload/crash. Host records and registry own allocations, not ctx.

Any thread; reentrancy unspecified.

unspecified

unspecified

Owner unload/crash removes registration; no individual unregister API.

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
(*register_raw)
cpp typed-wrapper include/scosdk/raw.hpp
plugin.Api()->register_raw(plugin.Self(), name, capability, detail::RawTrampoline, detail::ToCtx(id));
csharp typed-wrapper sdk/csharp/Sco.Sdk/Services.cs
r = a->register_raw(SelfPtr, n, c, &RawTrampoline, (void*)id);
lua unsupported sdk/docs/lua.md
The script sees only:
sdk/docs/lua.md
There is no io, os, package, require, debug, dofile, loadfile or FFI

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