class · System.Runtime.InteropServices

Marshal

public class System.Runtime.InteropServices.Marshal : System.Any

Native memory and conversions between Antril values and C data.

Tipo
class
Espacio de nombres
System.Runtime.InteropServices
Ensamblado
System.Core
Acceso
public, static, abstract
Archivo fuente
Interop.ant

Herencia

Clases base
Any Marshal

Métodos

static method AllocHGlobal(bytes: i64) -> void*
#

static

bytes of native memory, zeroed (FreeHGlobal gives it back).

static method FreeHGlobal(block: void*) -> void
#

static

static method AllocCoTaskMem(bytes: i32) -> void*
#

static

bytes of native memory, zeroed (FreeCoTaskMem gives it back).

static method FreeCoTaskMem(block: void*) -> void
#

static

static method StringToCoTaskMemUTF8(text: System.String<u8>) -> u8*
#

static

A null-terminated UTF-8 copy of text in native memory (FreeCoTaskMem gives it back).

static method StringToHGlobalUTF8(text: System.String<u8>) -> u8*
#

static

A null-terminated UTF-8 copy of text in native memory (FreeHGlobal gives it back).

static method StringToHGlobalUni(text: System.String<u8>) -> u16*
#

static

A null-terminated UTF-16 copy of text in native memory (FreeHGlobal gives it back).

static method PtrToStringUTF8(text: u8*) -> System.String<u8>
#

static

The null-terminated UTF-8 text at text (null: an empty string).

static method PtrToStringUTF8(text: u8*, length: i32) -> System.String<u8>
#

static

The length bytes of UTF-8 at text.

static method PtrToStringUni(text: u16*) -> System.String<u8>
#

static

The null-terminated UTF-16 text at text (null: an empty string).

static method PtrToStringUni(text: u16*, length: i32) -> System.String<u8>
#

static

The length UTF-16 units at text.

static method ReadByte(at: void*) -> u8
#

static

static method ReadByte(at: void*, offset: i32) -> u8
#

static

static method ReadInt16(at: void*) -> i16
#

static

static method ReadInt16(at: void*, offset: i32) -> i16
#

static

static method ReadInt32(at: void*) -> i32
#

static

static method ReadInt32(at: void*, offset: i32) -> i32
#

static

static method ReadInt64(at: void*) -> i64
#

static

static method ReadInt64(at: void*, offset: i32) -> i64
#

static

static method ReadIntPtr(at: void*) -> void*
#

static

static method ReadIntPtr(at: void*, offset: i32) -> void*
#

static

static method WriteByte(at: void*, value: u8) -> void
#

static

static method WriteByte(at: void*, offset: i32, value: u8) -> void
#

static

static method WriteInt16(at: void*, value: i16) -> void
#

static

static method WriteInt16(at: void*, offset: i32, value: i16) -> void
#

static

static method WriteInt32(at: void*, value: i32) -> void
#

static

static method WriteInt32(at: void*, offset: i32, value: i32) -> void
#

static

static method WriteInt64(at: void*, value: i64) -> void
#

static

static method WriteInt64(at: void*, offset: i32, value: i64) -> void
#

static

static method WriteIntPtr(at: void*, value: void*) -> void
#

static

static method WriteIntPtr(at: void*, offset: i32, value: void*) -> void
#

static

static method Copy<T>(source: T[], start: i32, destination: void*, length: i32) -> void
#

static

Copies length elements of source from start to native memory at destination.

static method Copy<T>(source: void*, destination: T[], start: i32, length: i32) -> void
#

static

Copies length elements from native memory at source into destination from start.

static method SizeOf<T>() -> i32
#

static

The size of a T in bytes (as C sees it).

Miembros heredados (5)

Código fuente

Marshal en Larva HIR, descompilado a partir de su Larva HIR.

System.Runtime.InteropServices.Marshal.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
}
Esc