Interface: DlopenCProtoResult
Result of dlopenCProto.
Extends
Disposable
Properties
symbols
symbols:
Record<string, (...args) =>any>
A callable for each function the header declared, keyed by its C name. The header is parsed at runtime, so the signatures are not known to TypeScript.
types
types:
Map<string,SimpleType<any>>
The types the header declared — structs, typedefs, and the pointer
types derived from them — keyed by the name they were declared under:
'struct test' for struct test { ... }, 's_test' for a typedef of
it, 's_test*' for a pointer to it. Words in a multi-word type name
are sorted, since their order is not significant in C.
Use these to build arguments, e.g.
Pointer.createRef(types.get('struct test'), { a: 1 }).
Methods
close()
close():
void
Close the shared library handle. Aliased as Symbol.dispose, so
using lib = dlopenCProto(...) closes it at scope exit.
Returns
void