<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FWindows%2FBluetooth</id>
		<title>Csharp/CSharp Tutorial/Windows/Bluetooth - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FWindows%2FBluetooth"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Windows/Bluetooth&amp;action=history"/>
		<updated>2026-04-29T18:57:09Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Windows/Bluetooth&amp;diff=6710&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Windows/Bluetooth&amp;diff=6710&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Windows/Bluetooth&amp;diff=6711&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Windows/Bluetooth&amp;diff=6711&amp;oldid=prev"/>
				<updated>2010-05-26T12:20:17Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Bluetooth Demo==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Runtime.InteropServices;&lt;br /&gt;
using System.Runtime.ConstrainedExecution;&lt;br /&gt;
using System.Security;&lt;br /&gt;
using System.Security.Permissions;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using Microsoft.Win32.SafeHandles;&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// Matches Win32 BLUETOOTH_FIND_RADIO_PARAMS&lt;br /&gt;
//&lt;br /&gt;
[StructLayout( LayoutKind.Sequential )]&lt;br /&gt;
class BluetoothFindRadioParams&lt;br /&gt;
{&lt;br /&gt;
    public BluetoothFindRadioParams() {&lt;br /&gt;
        dwSize = 4;&lt;br /&gt;
    }&lt;br /&gt;
    public UInt32 dwSize;&lt;br /&gt;
}&lt;br /&gt;
//&lt;br /&gt;
// Matches Win32 BLUETOOTH_RADIO_INFO&lt;br /&gt;
//&lt;br /&gt;
[StructLayout( LayoutKind.Sequential,&lt;br /&gt;
               CharSet = CharSet.Unicode )]&lt;br /&gt;
struct BluetoothRadioInfo&lt;br /&gt;
{&lt;br /&gt;
    public const int BLUETOOTH_MAX_NAME_SIZE = 248;&lt;br /&gt;
    public UInt32 dwSize;&lt;br /&gt;
    public UInt64 address;&lt;br /&gt;
    [MarshalAs( UnmanagedType.ByValTStr,&lt;br /&gt;
                SizeConst = BLUETOOTH_MAX_NAME_SIZE )]&lt;br /&gt;
    public string szName;&lt;br /&gt;
    public UInt32 ulClassOfDevice;&lt;br /&gt;
    public UInt16 lmpSubversion;&lt;br /&gt;
    public UInt16 manufacturer;&lt;br /&gt;
}&lt;br /&gt;
//&lt;br /&gt;
// Safe Bluetooth Enumeration Handle&lt;br /&gt;
//&lt;br /&gt;
[SecurityPermission( SecurityAction.Demand,&lt;br /&gt;
                     UnmanagedCode = true )]&lt;br /&gt;
sealed public class SafeBluetoothRadioFindHandle&lt;br /&gt;
    : SafeHandleZeroOrMinusOneIsInvalid&lt;br /&gt;
{&lt;br /&gt;
    private SafeBluetoothRadioFindHandle() : base( true ) { }&lt;br /&gt;
    override protected bool ReleaseHandle() {&lt;br /&gt;
        return BluetoothFindRadioClose( handle );&lt;br /&gt;
    }&lt;br /&gt;
    [DllImport( &amp;quot;Irprops.cpl&amp;quot; )]&lt;br /&gt;
    [ReliabilityContract( Consistency.WillNotCorruptState,&lt;br /&gt;
                          Cer.Success )]&lt;br /&gt;
    [SuppressUnmanagedCodeSecurity]&lt;br /&gt;
    private static extern bool BluetoothFindRadioClose(&lt;br /&gt;
                                              IntPtr hFind );&lt;br /&gt;
}&lt;br /&gt;
public class EntryPoint&lt;br /&gt;
{&lt;br /&gt;
    private const int ERROR_SUCCESS = 0;&lt;br /&gt;
    static void Main() {&lt;br /&gt;
        SafeFileHandle radioHandle;&lt;br /&gt;
        using( SafeBluetoothRadioFindHandle radioFindHandle&lt;br /&gt;
            = BluetoothFindFirstRadio(new BluetoothFindRadioParams(),&lt;br /&gt;
                                      out radioHandle) ) {&lt;br /&gt;
            if( !radioFindHandle.IsInvalid ) {&lt;br /&gt;
                BluetoothRadioInfo radioInfo = new BluetoothRadioInfo();&lt;br /&gt;
                radioInfo.dwSize = 520;&lt;br /&gt;
                UInt32 result = BluetoothGetRadioInfo( radioHandle,&lt;br /&gt;
                                                       ref radioInfo );&lt;br /&gt;
                if( result == ERROR_SUCCESS ) {&lt;br /&gt;
                    // Let&amp;quot;s send the contents of the radio info to the&lt;br /&gt;
                    // console.&lt;br /&gt;
                    Console.WriteLine( &amp;quot;address = {0:X}&amp;quot;,&lt;br /&gt;
                                       radioInfo.address );&lt;br /&gt;
                    Console.WriteLine( &amp;quot;szName = {0}&amp;quot;,&lt;br /&gt;
                                       radioInfo.szName );&lt;br /&gt;
                    Console.WriteLine( &amp;quot;ulClassOfDevice = {0}&amp;quot;,&lt;br /&gt;
                                       radioInfo.ulClassOfDevice );&lt;br /&gt;
                    Console.WriteLine( &amp;quot;lmpSubversion = {0}&amp;quot;,&lt;br /&gt;
                                       radioInfo.lmpSubversion );&lt;br /&gt;
                    Console.WriteLine( &amp;quot;manufacturer = {0}&amp;quot;,&lt;br /&gt;
                                       radioInfo.manufacturer );&lt;br /&gt;
                }&lt;br /&gt;
                radioHandle.Dispose();&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    [DllImport( &amp;quot;Irprops.cpl&amp;quot; )]&lt;br /&gt;
    private static extern SafeBluetoothRadioFindHandle&lt;br /&gt;
        BluetoothFindFirstRadio( [MarshalAs(UnmanagedType.LPStruct)]&lt;br /&gt;
                                 BluetoothFindRadioParams pbtfrp,&lt;br /&gt;
                                 out SafeFileHandle phRadio );&lt;br /&gt;
    [DllImport( &amp;quot;Irprops.cpl&amp;quot; )]&lt;br /&gt;
    private static extern UInt32&lt;br /&gt;
        BluetoothGetRadioInfo( SafeFileHandle hRadio,&lt;br /&gt;
                               ref BluetoothRadioInfo pRadioInfo );&lt;br /&gt;
}&lt;br /&gt;
/*Quote from: &lt;br /&gt;
Book Accelerated C# 2005&lt;br /&gt;
    * By Trey Nash&lt;br /&gt;
    * ISBN: 1-59059-717-6&lt;br /&gt;
    * 432 pp.&lt;br /&gt;
    * Published: Aug 2006&lt;br /&gt;
    * Price: $39.99&lt;br /&gt;
&lt;br /&gt;
*/&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>