C# Класс Nexus.Client.Games.Gamebryo.PluginManagement.Sorter.StringMarshaler

Marshals strings to and from unmanaged code.
Наследование: ICustomMarshaler
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CleanUpManagedData ( object ManagedObj ) : void

Cleans up the given managed data.

CleanUpNativeData ( IntPtr pNativeData ) : void

Cleans up native data.

GetInstance ( string p_strEncoding ) : ICustomMarshaler

Creates a marshaler for a string of the given encoding.

GetNativeDataSize ( ) : int

Gets the size of the native data being marshalled.

GetNullTerminatedStringPointer ( string p_strString, Encoding p_encEncoding ) : IntPtr

Returns a pointer to a unamanged, null terminated, copy the given string.

GetStringBytes ( IntPtr pNativeData, Encoding p_encEncoding ) : List

Reads the bytes representing a string from the given pointer.

MarshalManagedToNative ( object ManagedObj ) : IntPtr

Marshals the given string to a pointer.

MarshalNativeToManaged ( IntPtr pNativeData ) : object

Marshals the given pointer to a string.

StringMarshaler ( string p_strEncoding ) : System

A simple constructor that initializes the object with the given values.

Описание методов

CleanUpManagedData() публичный Метод

Cleans up the given managed data.
public CleanUpManagedData ( object ManagedObj ) : void
ManagedObj object The managed object to clean up.
Результат void

CleanUpNativeData() публичный Метод

Cleans up native data.
public CleanUpNativeData ( IntPtr pNativeData ) : void
pNativeData System.IntPtr The pointer to the native data to clean up.
Результат void

GetInstance() публичный статический Метод

Creates a marshaler for a string of the given encoding.
public static GetInstance ( string p_strEncoding ) : ICustomMarshaler
p_strEncoding string The encoding of the string to marshal.
Результат ICustomMarshaler

GetNativeDataSize() публичный Метод

Gets the size of the native data being marshalled.
public GetNativeDataSize ( ) : int
Результат int

GetNullTerminatedStringPointer() публичный статический Метод

Returns a pointer to a unamanged, null terminated, copy the given string.
public static GetNullTerminatedStringPointer ( string p_strString, Encoding p_encEncoding ) : IntPtr
p_strString string The string for which to create a pointer.
p_encEncoding System.Text.Encoding The encoding of the string.
Результат System.IntPtr

GetStringBytes() публичный статический Метод

Reads the bytes representing a string from the given pointer.
public static GetStringBytes ( IntPtr pNativeData, Encoding p_encEncoding ) : List
pNativeData System.IntPtr The pointer to the string whose bytes are to be read.
p_encEncoding System.Text.Encoding The encoding of the string whose bytes are to be read.
Результат List

MarshalManagedToNative() публичный Метод

Marshals the given string to a pointer.
public MarshalManagedToNative ( object ManagedObj ) : IntPtr
ManagedObj object The string to marshal.
Результат System.IntPtr

MarshalNativeToManaged() публичный Метод

Marshals the given pointer to a string.
public MarshalNativeToManaged ( IntPtr pNativeData ) : object
pNativeData System.IntPtr The pointer to the data to marshal to a string.
Результат object

StringMarshaler() публичный Метод

A simple constructor that initializes the object with the given values.
public StringMarshaler ( string p_strEncoding ) : System
p_strEncoding string The encoding of the string to marshal.
Результат System