/AudioEndPointController

A Windows command-line program for listing audio end-points and setting the default

Primary LanguageC++

AudioEndPointController

Adapted to be used as a DLL through P/INVOKE instead of an EXE as originally intended.

How to use in C#

private const string EPC = "EndPointController.dll";
[DllImport(EPC)] [return: MarshalAs(UnmanagedType.BStr)] extern static string GetList();
[DllImport(EPC, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr SetAudio(int deviceid);

[...]

Console.WriteLine(GetList());
Console.WriteLine(SetAudio(4));