Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropertyStore constains not all keys #480

Open
steam3d opened this issue Mar 30, 2023 · 0 comments
Open

PropertyStore constains not all keys #480

steam3d opened this issue Mar 30, 2023 · 0 comments

Comments

@steam3d
Copy link

steam3d commented Mar 30, 2023

When I get Properties from console like this:

$device = Get-CimInstance -ClassName Win32_PnPEntity | Out-GridView -Title 'Select Device' -OutputMode Single
$properties = Invoke-CimMethod -MethodName GetDeviceProperties -InputObject $device | Select-Object -ExpandProperty DeviceProperties

I have much more properties of audio endpoint.
For example:
image

When I try to get the same using cscore:

using (var enumerator = new MMDeviceEnumerator())
{
	var audioEndpoints = enumerator.EnumAudioEndpoints(DataFlow.Render, DeviceState.Active);
	foreach (var audioEnd in audioEndpoints)
	{
		Console.WriteLine(audioEnd.FriendlyName);
		Console.WriteLine(audioEnd.DeviceID);
		foreach (var property in audioEnd.PropertyStore)
		{
			Console.WriteLine($"     {property.Key} = {property.Value}");
		}

		Console.WriteLine();
	}	
}

I do not get the key:
SWD\MMDEVAPI\{0.0.0.00000000}.{31BD64A4-4278-4C62-A9A0-021534C7A2D0} {83DA6326-97A6-4088-9453-A1923F573B29} 102 DEVPKEY_Device_LastArrivalDate 16 30.03.2023 15:56:50

And I do not get a lot of other keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant