C# 클래스 Nexus.Client.Games.Gamebryo.PluginManagement.Sorter.StringMarshaler

Marshals strings to and from unmanaged code.
상속: ICustomMarshaler
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5 1 사용 예제들

공개 메소드들

메소드 설명
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