public static BluetoothWin32RadioInRangeEventArgs Create( BluetoothDeviceInfoProperties previousFlags, BluetoothDeviceInfoProperties currentFlags, BLUETOOTH_DEVICE_INFO deviceInfo) { var e = new BluetoothWin32RadioInRangeEventArgs(deviceInfo, currentFlags, previousFlags); return(e); }
private void ReadBlobBTH_DEVICE_INFO(byte[] buffer, IBluetoothDeviceInfo dev) { // XXXX - Testing only, at least delete the "Console.WriteLine" before use. - XXXX IntPtr pBlob = Marshal32.ReadIntPtr(buffer, WqsOffset.lpBlob_56); if (pBlob != IntPtr.Zero) { BLOB blob = (BLOB)Marshal.PtrToStructure(pBlob, typeof(BLOB)); if (blob.pBlobData != IntPtr.Zero) { BTH_DEVICE_INFO bdi = (BTH_DEVICE_INFO)Marshal.PtrToStructure(blob.pBlobData, typeof(BTH_DEVICE_INFO)); BluetoothDeviceInfoProperties flags = bdi.flags; Debug.WriteLine(String.Format(CultureInfo.InvariantCulture, "[BTH_DEVICE_INFO: {0:X12}, '{1}' = 0x{2:X4}]", bdi.address, flags, bdi.flags)); Trace.Assert((flags & ~BDIFMasks.AllOrig) == 0, "*Are* new flags there!"); } } }
//---- private BluetoothWin32RadioInRangeEventArgs(BLUETOOTH_DEVICE_INFO bdi0, BluetoothDeviceInfoProperties currentFlags, BluetoothDeviceInfoProperties previousFlags) : base(bdi0) { _currentFlags = currentFlags; _previousFlags = previousFlags; }