change defaults poc
This commit is contained in:
parent
cb320da8cd
commit
33f3d8216f
5 changed files with 197 additions and 67 deletions
|
|
@ -569,8 +569,10 @@ void Overseer::initCOMLibrary() {
|
|||
//todo: wtf? why is it working? floats are ptrs...
|
||||
this->guid = GUIDToNGuid(&tempGuid);
|
||||
|
||||
//if(FAILED(CoCreateInstance(__uuidof(CPolicyConfigClient),
|
||||
// NULL, CLSCTX_ALL, __uuidof(IPolicyConfig10), (LPVOID *)&policyConfig))) {exit(-1);}
|
||||
HRESULT hre = CoCreateInstance(__uuidof(CPolicyConfigClient),
|
||||
NULL, CLSCTX_ALL,
|
||||
__uuidof(IPolicyConfig7), (LPVOID *)&policyConfig);
|
||||
if (hre != S_OK) exit(-1);
|
||||
|
||||
//TODO: Release lpguid?
|
||||
//TODO: Uninitialize COM
|
||||
|
|
@ -606,6 +608,14 @@ void Overseer::reloadEndpoints(Flows flow) {
|
|||
}
|
||||
|
||||
deviceCollection->Release();
|
||||
//IPolicyConfig7 test
|
||||
deviceEnumerator->GetDefaultAudioEndpoint(MSflow, ERole::eCommunications, &temp);
|
||||
LPWSTR tempString = nullptr;
|
||||
temp->GetId(&tempString);
|
||||
HRESULT hre = policyConfig->SetDefaultEndpoint(
|
||||
tempString,
|
||||
ERole::eMultimedia
|
||||
);
|
||||
|
||||
/*
|
||||
* Discerning default endpoints per role
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue