{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/cppwinrt/issues/325","repository_url":"https://api.github.com/repos/Microsoft/cppwinrt","labels_url":"https://api.github.com/repos/Microsoft/cppwinrt/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/cppwinrt/issues/325/comments","events_url":"https://api.github.com/repos/Microsoft/cppwinrt/issues/325/events","html_url":"https://github.com/Microsoft/cppwinrt/issues/325","id":294252466,"number":325,"title":"Addressing Id in DeviceInformation","user":{"login":"jevansAN","id":33500950,"avatar_url":"https://avatars1.githubusercontent.com/u/33500950?v=4","gravatar_id":"","url":"https://api.github.com/users/jevansAN","html_url":"https://github.com/jevansAN","followers_url":"https://api.github.com/users/jevansAN/followers","following_url":"https://api.github.com/users/jevansAN/following{/other_user}","gists_url":"https://api.github.com/users/jevansAN/gists{/gist_id}","starred_url":"https://api.github.com/users/jevansAN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jevansAN/subscriptions","organizations_url":"https://api.github.com/users/jevansAN/orgs","repos_url":"https://api.github.com/users/jevansAN/repos","events_url":"https://api.github.com/users/jevansAN/events{/privacy}","received_events_url":"https://api.github.com/users/jevansAN/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-05T01:51:57Z","updated_at":"2018-02-05T03:12:35Z","closed_at":"2018-02-05T03:12:35Z","author_association":"NONE","body":"Having succeeded in obtaining a DeviceInformationCollection using a co_await with DeviceInformation::FindAllAsync(portSelector) I would like to create a MIDIPort using the deviceId of one of the DeviceInformation objects. Winrt docs in C# do this with, e.g. identifier = deviceInfo.Id;\r\nand I assume that in cppwinrt that would be deviceInfo.Id(); but neither can be used. When attempting to access the Id I am told that DeviceInformation has no member \"Id.\" How would one access the information in DeviceInformation using cppwinrt?\r\nI  have found it necessary to declare the DeviceInformation object as\r\n\r\n    `winrt::Windows::Foundation::Collections::IIterator<winrt::Windows::Devices::Enumeration::DeviceInformation> devInfo`\r\n\r\nsince winrt::Windows::Devices::Enumeration::DeviceInformation devInfo is not accepted as a return value when fetching from DeviceInformationCollection using, for example, devInfo = m_output_devices.First().  But I have a feeling this declaration must have something to do with the problem. DeviceInformation objects are used elsewhere than just in MIDI, though, so perhaps someone has a solution."}}
{"actor":{"display_login":"DefaultRyan"}}