BASS.NET API for the Un4seen BASS Audio LibraryUtilsIntPtrAsStringAnsi 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 Ansi *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.12.0
Syntax

public static string IntPtrAsStringAnsi(
	IntPtr ansiPtr,
	int len
)

Parameters

ansiPtr
Type: SystemIntPtr
The IntPtr which represents the address of the first character of the unmanaged *char (string, 8-bit).
len
Type: SystemInt32
The number of bytes to decode.

Return Value

Type: String
The translated unicode string.
Remarks

This method actually expands the original 8-bit chars to unicode 16-bit chars as required by .NET (since here each string a unicode ;-).
See Also

Reference