Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Module

System.Runtime.InteropServices

module System.Runtime.InteropServices

Modules

1 item

Types

10 items
FieldOffsetAttribute Places an instance field at a nonnegative byte offset in an Explicit native layout. Offsets may overlap. This does not change managed field access or GC tracking.
LayoutKind Selects native field placement. Auto layout cannot cross a native boundary.
MarshalAsAttribute Overrides the native representation of one parameter, result or native struct field. Field overrides currently support Boolean Bool8/Bool32 storage in native-library layouts; they…
NativeCallingConvention Selects the ABI used by a foreign function. Unsupported conventions are rejected.
NativeExportAttribute Exposes a supported static function through the platform native calling convention. Exporting does not transfer pointer ownership or publish managed object layout.
NativeImportAttribute Binds an extern static method or namespace function to an exact native export. Library loading and symbol resolution occur on first invocation. The declaration must match the actua…
NativeStringMarshalling Selects explicit, call-scoped input string conversion for foreign functions.
NativeType Explicit native representations supported by parameter and result marshalling.
Ptr<T> A non-owning typed native pointer. Copying this value copies the address, not its storage. Native use requires an unsafe context and a live allocation with a compatible layout. The…
StructLayoutAttribute Describes native struct storage; does not convert or pin managed storage. The current native-library backend supports Sequential and Explicit layouts on macOS ARM64. Passing struct…