waveoutgetnumdevs (winmm)
Last changed: josep1er@cmich.edu-141.209.229.179

.
Summary
Get the number of wave devices present.

C# Signature:

[DllImport("winmm.dll", SetLastError=true)]
static extern uint waveOutGetNumDevs();

VB Signature:

Declare Auto Function waveOutGetNumDevs Lib "winmm.dll" () As Integer

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Calling waveOutGetNumDevs() from Powershell:

$pinvokeCode = @"
using System;
using System.Runtime.InteropServices;
namespace NSMain {
  class wave {
    [DllImport("winmm.dll", SetLastError=true)]
    public static extern uint waveOutGetNumDevs();
  }
  public class Wave {
   public static string waveOutGetNumDevs() {
   System.Console.Write(wave.waveOutGetNumDevs());
   return "";
   }
  }
}
"@
Add-Type $pinvokeCode
[NSMain.Wave]::waveOutGetNumDevs()

Documentation