夸
夸父
Guest
Windows:evices::Enumeration:eviceInformation m_deviceInformation
auto ass = m_deviceInformation.Properties().TryLookup(L"System.Devices.Aep.DeviceAddress");
if (ass)
{
unbox_value< ? >(ass);
}
auto value = m_deviceInformation.Properties().TryLookup(L"System.Devices.Aep.Bluetooth.LastSeenTime");
if(value)
{
unbox_value<Windows::System:ateTimeSettings>(value);
}
I'm using c++/winrt to get bluetooth information.
I know how to get DeviceAddress property and LastSeenTime property in cshap.
if(DeviceInfo.Properties.ContainsKey("System.Devices.Aep.DeviceAddress"))
{
BluetoothAddressAsString = ret = DeviceInfo.Properties["System.Devices.Aep.DeviceAddress"].ToString();
BluetoothAddressAsUlong = Convert.ToUInt64(BluetoothAddressAsString.Replace(":", String.Empty), 16);
}
if (DeviceInfo.Properties.ContainsKey("System.Devices.Aep.Bluetooth.LastSeenTime") && (DeviceInfo.Properties["System.Devices.Aep.Bluetooth.LastSeenTime"] != null))
{
LastSeenTime = ((System.DateTimeOffset)DeviceInfo.Properties["System.Devices.Aep.Bluetooth.LastSeenTime"]).UtcDateTime;
}
but how to get them in c++/winrt.
夸父
Continue reading...
auto ass = m_deviceInformation.Properties().TryLookup(L"System.Devices.Aep.DeviceAddress");
if (ass)
{
unbox_value< ? >(ass);
}
auto value = m_deviceInformation.Properties().TryLookup(L"System.Devices.Aep.Bluetooth.LastSeenTime");
if(value)
{
unbox_value<Windows::System:ateTimeSettings>(value);
}
I'm using c++/winrt to get bluetooth information.
I know how to get DeviceAddress property and LastSeenTime property in cshap.
if(DeviceInfo.Properties.ContainsKey("System.Devices.Aep.DeviceAddress"))
{
BluetoothAddressAsString = ret = DeviceInfo.Properties["System.Devices.Aep.DeviceAddress"].ToString();
BluetoothAddressAsUlong = Convert.ToUInt64(BluetoothAddressAsString.Replace(":", String.Empty), 16);
}
if (DeviceInfo.Properties.ContainsKey("System.Devices.Aep.Bluetooth.LastSeenTime") && (DeviceInfo.Properties["System.Devices.Aep.Bluetooth.LastSeenTime"] != null))
{
LastSeenTime = ((System.DateTimeOffset)DeviceInfo.Properties["System.Devices.Aep.Bluetooth.LastSeenTime"]).UtcDateTime;
}
but how to get them in c++/winrt.
夸父
Continue reading...