/// <inheritdoc cref="GetStringList(Device*, GetEnumerateAllContextStringList)" /> public IEnumerable <string> GetStringList(GetEnumerateAllContextStringList param) { unsafe { var result = GetStringList(null, param); if (result == (char *)0) { return(new List <string>()); } var strings = new List <string>(); var currentPos = result; while (true) { var currentString = Marshal.PtrToStringAnsi(new IntPtr(currentPos)); if (currentString is null) { break; } strings.Add(currentString); currentPos += currentString.Length + 1; } return(strings); } }
/// <inheritdoc cref="GetStringList(ALDevice, GetEnumerateAllContextStringList)"/> public static IEnumerable <string> GetStringList(GetEnumerateAllContextStringList param) { unsafe { byte *result = GetStringList(ALDevice.Null, param); return(ALC.ALStringListToList(result)); } }
/// <inheritdoc /> public abstract unsafe char *GetStringList(Device *device, GetEnumerateAllContextStringList param);
/// <inheritdoc /> public unsafe partial byte *GetStringList(Device *device, GetEnumerateAllContextStringList param);
/// <summary> /// Gets a named property on the context. /// </summary> /// <param name="device">The device for the context.</param> /// <param name="param">The named property.</param> /// <returns>The value.</returns> [DllImport(ALC.Lib, EntryPoint = "alcGetString", ExactSpelling = true, CallingConvention = ALC.AlcCallingConv)] public static extern unsafe byte *GetStringList(ALDevice device, GetEnumerateAllContextStringList param);
public static extern unsafe byte *GetStringList(ALDevice device, GetEnumerateAllContextStringList param);