C# Class llbc.LibUtil

llbc library internal utility class encapsulation.
Mostrar archivo Open project: lailongwei/llbc Class Usage Examples

Public Methods

Method Description
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.

Method Details

CreateNativeStr() public static method

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
return System.IntPtr

CreateNativeStr() public static method

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
return System.IntPtr

CreateNativeStr() public static method

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
return System.IntPtr

FreeNativePtr() public static method

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
return void

FreeNativePtr() public static method

Free native pointer resource.
public static FreeNativePtr ( void ptr ) : void
ptr void the native resource pointer
return void

Ptr2Str() public static method

Convert Pointer to string. pointer pointer length the converted string
public static Ptr2Str ( IntPtr ptr, int len ) : string
ptr System.IntPtr
len int
return string

Ptr2Str() public static method

Convert pointer to string.
public static Ptr2Str ( byte ptr, int len ) : string
ptr byte pointer
len int pointer length
return string