コード例 #1
0
        internal WindowsBluetoothRadio(WindowsRadioHandle handleW)
        {
            this._handle = handleW;

            Debug.WriteLine("WindowsBluetoothRadio..ctor h=" + Handle.ToString("X"));
            radio        = new BLUETOOTH_RADIO_INFO();
            radio.dwSize = 520;
            System.Diagnostics.Debug.Assert(System.Runtime.InteropServices.Marshal.SizeOf(radio) == radio.dwSize, "BLUETOOTH_RADIO_INFO SizeOf == dwSize");

            int hresult = NativeMethods.BluetoothGetRadioInfo(_handle, ref radio);

            if (hresult != 0)
            {
                throw new System.ComponentModel.Win32Exception(hresult, "Error retrieving Radio information.");
            }

            ReadVersionInfo(_handle, ref _lmpV, ref _lmpSubv, ref _hciV, ref _hciRev, ref _lmpFeatures);
        }
コード例 #2
0
 internal static extern int BluetoothGetRadioInfo(WindowsRadioHandle hRadio, ref BLUETOOTH_RADIO_INFO pRadioInfo);