Basic idea for that
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <ole2.h>
//#include <mmdeviceapi.h>
//#include <endpointvolume.h>
#pragma comment(lib, "ole32.lib")
//extern
const CLSID CLSID_MMDeviceEnumerator = {0xBCDE0395,0xE52F,0x467C,0x8E,0x3D,0xC4,0x57,0x92,0x91,0x69,0x2E}; // BCDE0395-E52F-467C-8E3D-C4579291692E
//extern
const IID IID_IMMDeviceEnumerator = {0xA95664D2,0x9614,0x4F35,0xA7,0x46,0xDE,0x8D,0xB6,0x36,0x17,0xE6}; // A95664D2-9614-4F35-A746-DE8DB63617E6
int main(void)
{
CoInitialize(NULL);
LPVOID device = NULL;
HRESULT ok = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL,
CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator,
&device);
CoUninitialize();
return EXIT_SUCCESS;
}