Ejemplo n.º 1
0
        public static BluetoothWin32RadioInRangeEventArgs Create(
            BluetoothDeviceInfoProperties previousFlags,
            BluetoothDeviceInfoProperties currentFlags,
            BLUETOOTH_DEVICE_INFO deviceInfo)
        {
            var e = new BluetoothWin32RadioInRangeEventArgs(deviceInfo, currentFlags, previousFlags);

            return(e);
        }
Ejemplo n.º 2
0
        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!");
                }
            }
        }
Ejemplo n.º 3
0
 //----
 private BluetoothWin32RadioInRangeEventArgs(BLUETOOTH_DEVICE_INFO bdi0, BluetoothDeviceInfoProperties currentFlags, BluetoothDeviceInfoProperties previousFlags)
     : base(bdi0)
 {
     _currentFlags  = currentFlags;
     _previousFlags = previousFlags;
 }