/// <summary> /// Получить описание системного устройства. /// </summary> /// <param name="aDeviceId">Идентификатор устройства.</param> /// <param name="aDeviceName">Название устройства.</param> /// <param name="aChannelCount">Количество каналов устройства.</param> private static void GetDeviceCaps(int aDeviceId, out string aDeviceName, out int aChannelCount) { var wOutCaps = new WAVEOUTCAPS(); NativeMethods.waveOutGetDevCaps(new UIntPtr((uint)aDeviceId), ref wOutCaps, (uint)Marshal.SizeOf(typeof(WAVEOUTCAPS))); aDeviceName = wOutCaps.SzPname; aChannelCount = wOutCaps.WChannels; }
public static extern uint waveOutGetDevCaps(UIntPtr hWaveOut, ref WAVEOUTCAPS pwoc, uint cbwoc);