MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / SoundDeviceGetName

Function SoundDeviceGetName

source/script2.cpp:7075–7087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7073};
7074
7075LPWSTR SoundDeviceGetName(IMMDevice *aDev)
7076{
7077 IPropertyStore *store;
7078 PROPVARIANT prop;
7079 if (SUCCEEDED(aDev->OpenPropertyStore(STGM_READ, &store)))
7080 {
7081 if (FAILED(store->GetValue(PKEY_Device_FriendlyName, &prop)))
7082 prop.pwszVal = nullptr;
7083 store->Release();
7084 return prop.pwszVal;
7085 }
7086 return nullptr;
7087}
7088
7089
7090HRESULT SoundSetGet_GetDevice(LPTSTR aDeviceString, IMMDevice *&aDevice)

Callers 2

SoundSetGet_GetDeviceFunction · 0.85
BIF_DECLFunction · 0.85

Calls 1

ReleaseMethod · 0.45

Tested by

no test coverage detected