Tag Archives: winAPI

[How-to] Record sound in .NET application

Advertisement from Google First import mciSendStringA from winmm.dll: [DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] private static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback); To start recording: Advertisement from Google mciSendString("open new Type waveaudio Alias recsound", null, 0, 0); mciSendString("set recsound time format ms bitspersample 16… Read More »