You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on windows 11, cscore v1.2.1.2 I am attempting to override the "listen to this device" checkbox property value of the recording device
privatevoidbutton1_Click(objectsender,EventArgse){// Create the MMDeviceEnumerator COM object to interact with audio devicesvardeviceEnumerator=newMMDeviceEnumerator();MMDeviceCollectiondevices=deviceEnumerator.EnumAudioEndpoints(DataFlow.Capture,DeviceState.Active);vardeviceID="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}";foreach(vardeviceIindevices){deviceID=deviceI.DeviceID;break;}// GetDevice using the device idvardevice=deviceEnumerator.GetDevice(deviceID);// Open the PropertyStorevarpropertyStore=device.PropertyStore;// Define required GUID and PIDvarcheckBoxGuid=newGuid("{24DBB0FC-9311-4B3D-9CF0-18FF155639D4}");varcheckBoxPid=1;// Go through propertiesforeach(varproinpropertyStore){varkey=pro.Key;if(key.PropertyID!=checkBoxPid)continue;if(key.ID!=checkBoxGuid)continue;varval=pro.Value;val.BoolValue=!val.BoolValue;/*var val2 = new PropertyVariant(); val2.DataType = VarEnum.VT_BOOL; val2.BoolValue = true; val2.BoolValue = !val.BoolValue;*/// Update the valuepropertyStore.SetValue(key,val);break;};}
I get the exception
CSCore.Win32.Win32ComException: 'IPropertyStore::SetValue caused an error: 0x80070005, "Access is denied.".'
in any mode (release, debug) and with Admin rights.
is there anything apparent missing?
The text was updated successfully, but these errors were encountered:
Hey
on windows 11,
cscore v1.2.1.2
I am attempting to override the "listen to this device" checkbox property value of the recording deviceI get the exception
in any mode (release, debug) and with Admin rights.
is there anything apparent missing?
The text was updated successfully, but these errors were encountered: