BASS.NET API for the Un4seen BASS Audio Library

UtilsIntPtrAsStringUtf8 Method (IntPtr, Int32)

BASS.NET API for the Un4seen BASS Audio Library
Translates an IntPtr into a .NET managed string.

Sometime BASS returns an IntPtr which actually represents a pointer to a memory block containing a null-terminated UTF-8 *char (string, 8-bit). This method does this translation for you and returns the actual string.

Namespace:  Un4seen.Bass
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public static string IntPtrAsStringUtf8(
	IntPtr utf8Ptr,
	out int len
)

Parameters

utf8Ptr
Type: SystemIntPtr
The IntPtr which represents the address of the first character of the unmanaged *char (string, UTF-8, 8-bit).
len
Type: SystemInt32
Returns the number of bytes read (the length of the decoded string).

Return Value

Type: String
The translated unicode string.
See Also

Reference