C# Класс llbc.LibUtil

llbc library internal utility class encapsulation.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CreateNativeStr ( string str, IntPtr nativeLen, bool appendNull = true ) : IntPtr

Create native string.

CreateNativeStr ( string str, bool appendNull = true ) : IntPtr

Create native string.

CreateNativeStr ( string str, int &nativeLen, bool appendNull = true ) : IntPtr

Create native string.

FreeNativePtr ( IntPtr &ptr, bool setToZero = true ) : void

Free native pointer resource.

FreeNativePtr ( void ptr ) : void

Free native pointer resource.

Ptr2Str ( IntPtr ptr, int len ) : string

Convert Pointer to string. pointer pointer length the converted string

Ptr2Str ( byte ptr, int len ) : string

Convert pointer to string.

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

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

Create native string.
public static CreateNativeStr ( string str, IntPtr nativeLen, bool appendNull = true ) : IntPtr
str string the managed string object
nativeLen System.IntPtr native string length
appendNull bool auto append \0 character option, default is true
Результат System.IntPtr

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

Create native string.
public static CreateNativeStr ( string str, bool appendNull = true ) : IntPtr
str string the managed string object
appendNull bool auto append \0 character option, default is true
Результат System.IntPtr

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

Create native string.
public static CreateNativeStr ( string str, int &nativeLen, bool appendNull = true ) : IntPtr
str string the managed string object
nativeLen int native string length
appendNull bool auto append \0 character option, default is true
Результат System.IntPtr

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

Free native pointer resource.
public static FreeNativePtr ( IntPtr &ptr, bool setToZero = true ) : void
ptr System.IntPtr the native resource pointer
setToZero bool after free native pointer resource, need set to Zero or not
Результат void

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

Free native pointer resource.
public static FreeNativePtr ( void ptr ) : void
ptr void the native resource pointer
Результат void

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

Convert Pointer to string. pointer pointer length the converted string
public static Ptr2Str ( IntPtr ptr, int len ) : string
ptr System.IntPtr
len int
Результат string

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

Convert pointer to string.
public static Ptr2Str ( byte ptr, int len ) : string
ptr byte pointer
len int pointer length
Результат string