HRESULT hr = E_FAIL;
GUID guidContext = GUID_NULL;
IMMDeviceEnumerator *pEnumerator = NULL;
IMMDevice *pDevice = NULL;
IAudioEndpointVolume *pEndptVol = NULL;
::CoInitialize(NULL);
hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IMMDeviceEnumerator), (void**)&pEnumerator);
hr = pEnumerator->GetDefaultAudioEndpoint(eRender, eConsole, &pDevice);
hr = pDevice->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_ALL, NULL, (void**)&pEndptVol);
hr = pEndptVol->SetMute(TRUE, &guidContext);
::CoUninitialize();
댓글 없음:
댓글 쓰기