[DllImport("winmm.dll", SetLastError=true)]
static extern uint waveOutGetNumDevs();
Declare Auto Function waveOutGetNumDevs Lib "winmm.dll" () As Integer
None.
Do you know one? Please contribute it!
None.
Please add some!
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()