I want to enumerate all available AudioDevices from Audio Endpoints, using IPropertyStore. But VC++ linker can't find reference to PKEY_Device_FriendlyName operand in header and lib files.
I need a quick solution, what should I do?
I want to enumerate all available AudioDevices from Audio Endpoints, using IPropertyStore. But VC++ linker can't find reference to PKEY_Device_FriendlyName operand in header and lib files.
I need a quick solution, what should I do?
Just add to your code:
static PROPERTYKEY key;
GUID IDevice_FriendlyName = { 0xa45c254e, 0xdf1c, 0x4efd, { 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0 } };
key.pid = 14;
key.fmtid = IDevice_FriendlyName;
PROPVARIANT varName;
// Initialize container for property value.
PropVariantInit(&varName);
and pass &key into IPropertyStore* ->GetValue(key, &varName);