class · System.Runtime.InteropServices
Marshal
public class System.Runtime.InteropServices.Marshal : System.Any
Native memory and conversions between Antril values and C data.
- Kind
- class
- Namespace
- System.Runtime.InteropServices
- Assembly
- System.Core
- Access
- public, static, abstract
- Source file
Interop.ant
Inheritance
- Base classes
-
AnyMarshal
Methods
bytes of native memory, zeroed (FreeHGlobal gives it back).
static method FreeHGlobal(block: void*) -> void
#
bytes of native memory, zeroed (FreeCoTaskMem gives it back).
static method FreeCoTaskMem(block: void*) -> void
#
static method StringToCoTaskMemUTF8(text: System.String<u8>) -> u8*
#
A null-terminated UTF-8 copy of text in native memory (FreeCoTaskMem gives it back).
static method StringToHGlobalUTF8(text: System.String<u8>) -> u8*
#
A null-terminated UTF-8 copy of text in native memory (FreeHGlobal gives it back).
static method StringToHGlobalUni(text: System.String<u8>) -> u16*
#
A null-terminated UTF-16 copy of text in native memory (FreeHGlobal gives it back).
static method PtrToStringUTF8(text: u8*) -> System.String<u8>
#
The null-terminated UTF-8 text at text (null: an empty string).
static method PtrToStringUTF8(text: u8*, length: i32) -> System.String<u8>
#
The length bytes of UTF-8 at text.
static method PtrToStringUni(text: u16*) -> System.String<u8>
#
The null-terminated UTF-16 text at text (null: an empty string).
static method PtrToStringUni(text: u16*, length: i32) -> System.String<u8>
#
The length UTF-16 units at text.
static method ReadIntPtr(at: void*) -> void*
#
static method WriteIntPtr(at: void*, value: void*) -> void
#
Copies length elements of source from start to native memory at destination.
Copies length elements from native memory at source into destination from start.
The size of a T in bytes (as C sees it).
Inherited members (5)
GetTypemethod from AnyUndescribedmethod from AnyToStringmethod from AnyHashmethod from Anydestroymethod from Any
Source
Marshal as Larva HIR, decompiled from its Larva HIR.
// Native memory and conversions between Antril values and C data.
public class System.Runtime.InteropServices.Marshal : System.Any
{
// `bytes` of native memory, zeroed (FreeHGlobal gives it back).
static method AllocHGlobal(bytes: i64) -> void*
static method FreeHGlobal(block: void*) -> void
// `bytes` of native memory, zeroed (FreeCoTaskMem gives it back).
static method AllocCoTaskMem(bytes: i32) -> void*
static method FreeCoTaskMem(block: void*) -> void
// A null-terminated UTF-8 copy of `text` in native memory (FreeCoTaskMem gives it back).
static method StringToCoTaskMemUTF8(text: System.String<u8>) -> u8*
// A null-terminated UTF-8 copy of `text` in native memory (FreeHGlobal gives it back).
static method StringToHGlobalUTF8(text: System.String<u8>) -> u8*
// A null-terminated UTF-16 copy of `text` in native memory (FreeHGlobal gives it back).
static method StringToHGlobalUni(text: System.String<u8>) -> u16*
// The null-terminated UTF-8 text at `text` (null: an empty string).
static method PtrToStringUTF8(text: u8*) -> System.String<u8>
// The `length` bytes of UTF-8 at `text`.
static method PtrToStringUTF8(text: u8*, length: i32) -> System.String<u8>
// The null-terminated UTF-16 text at `text` (null: an empty string).
static method PtrToStringUni(text: u16*) -> System.String<u8>
// The `length` UTF-16 units at `text`.
static method PtrToStringUni(text: u16*, length: i32) -> System.String<u8>
static method ReadByte(at: void*) -> u8
static method ReadByte(at: void*, offset: i32) -> u8
static method ReadInt16(at: void*) -> i16
static method ReadInt16(at: void*, offset: i32) -> i16
static method ReadInt32(at: void*) -> i32
static method ReadInt32(at: void*, offset: i32) -> i32
static method ReadInt64(at: void*) -> i64
static method ReadInt64(at: void*, offset: i32) -> i64
static method ReadIntPtr(at: void*) -> void*
static method ReadIntPtr(at: void*, offset: i32) -> void*
static method WriteByte(at: void*, value: u8) -> void
static method WriteByte(at: void*, offset: i32, value: u8) -> void
static method WriteInt16(at: void*, value: i16) -> void
static method WriteInt16(at: void*, offset: i32, value: i16) -> void
static method WriteInt32(at: void*, value: i32) -> void
static method WriteInt32(at: void*, offset: i32, value: i32) -> void
static method WriteInt64(at: void*, value: i64) -> void
static method WriteInt64(at: void*, offset: i32, value: i64) -> void
static method WriteIntPtr(at: void*, value: void*) -> void
static method WriteIntPtr(at: void*, offset: i32, value: void*) -> void
// Copies `length` elements of `source` from `start` to native memory at `destination`.
static method Copy<T>(source: T[], start: i32, destination: void*, length: i32) -> void
// Copies `length` elements from native memory at `source` into `destination` from `start`.
static method Copy<T>(source: void*, destination: T[], start: i32, length: i32) -> void
// The size of a `T` in bytes (as C sees it).
static method SizeOf<T>() -> i32
}