sco_plugin_load
sco_result sco_plugin_load(const sco_api* api, sco_plugin* self)
Signature
Section titled “Signature”sco_result (const sco_api *, sco_plugin *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sco_plugin_load |
| Record ID | sco-plugin-load |
| Service | native-plugin |
| Table | Native entrypoint (no table) |
| Version macro | SCO_API_MAJOR/SCO_API_MINOR |
| Packed table version | Not applicable |
| Since / availability | API 1.0; received API fields gated by size |
| Complete member extent (x64 bytes) | None |
| Table size (x64 bytes) | None |
Parameters and buffers
Section titled “Parameters and buffers”sco_result sco_plugin_load(const sco_api* api, sco_plugin* self)
Results and failures
Section titled “Results and failures”OK stays loaded; any other return rejects load; guarded fault disables plugin. Missing required capabilities handled by discovery; load-specific absence policy belongs to plugin
Absent capability
Section titled “Absent capability”Missing required capabilities handled by discovery; load-specific absence policy belongs to plugin
Ownership
Section titled “Ownership”Borrowed host API and opaque self valid until unload; plugin owns its private state/allocations; internal allocation unspecified
Thread affinity
Section titled “Thread affinity”Game thread per API reference; recursive load reentrancy unspecified
Callback context
Section titled “Callback context”unspecified
Reentrancy
Section titled “Reentrancy”unspecified
Cleanup and cancellation
Section titled “Cleanup and cancellation”Ordinary failed-load/non-retained crash cleanup removes registrations, queued work and owned resources. If a nested consumer obtained the provider table during load, a failed load is refused with backing state retained: no owner release, resource hooks, export clearing or module closure. Exposed-provider faults instead become terminal faulted with retained state and restart required. Do not rely on unload after a failed load.
Language mappings
Section titled “Language mappings”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.hsco_plugin_load(const sco_api* api, sco_plugin* self) |
| cpp | typed-wrapper | include/scosdk/plugin.hppextern “C” SCO_EXPORT sco_result sco_plugin_load(const sco_api* api, sco_plugin* self) |
| csharp | typed-wrapper | sdk/examples/cs_hello/CsHello.cs[UnmanagedCallersOnly(EntryPoint = “sco_plugin_load”)]sdk/examples/cs_hello/CsHello.cs PluginExports.Load<Hello>( |
| lua | unsupported | sdk/docs/lua.mdA Lua plugin is a folder with |
Examples
Section titled “Examples”- tests/abi_v1.c
- tests/test_plugins.cpp
- sdk/csharp/Sco.Sdk.Tests/FakeHost.cs
- tools/test.sh
- sdk/csharp/Sco.Sdk.Tests/Layout.cs
ABI pins prove layout, not semantic behavior or a live game session.