Geeks With Blogs

News
WinToolZone - Spelunking Microsoft Technologies
I work as a developer on the Common Language Runtime (CLR) team, specifically in the areas of exception handling and CLR hosting.
Disclaimer

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Inside and Out... An attempt to understand technology better...

[Originally posted on 5th July 2006]

One of the communication protocols not present in .NET Framework class libraries is Bluetooth. So today, I started to work on my implementation of a managed API for Bluetooth programming - WinToolZone.Bluetooth. I am authoring it using Managed C++ and leveraging the Microsoft Bluetooth stack APIs.

I just completed implementing the support for enumerating the Bluetooth radios on a machine. Below is a C# program that exemplifies how they can be enumerated:

.
   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Text;
   4:  using WinToolZone;
   5:   
   6:  namespace BTHCSClient
   7:  {
   8:      class Program
   9:      {
  10:          static void Main(string[] args)
  11:          {
  12:              Bluetooth bth = new Bluetooth();
  13:              if (bth.RefreshRadios())
  14:              {
  15:                  foreach (BluetoothRadio radio in bth.Radios)
  16:                  {
  17:                      Console.WriteLine("RadioName: {0}", radio.Name);
  18:                      Console.WriteLine("Address: {0}", radio.Address.ToString());
  19:                      Console.WriteLine("ManuID: {0}", radio.ManufacturerID);
  20:                      Console.WriteLine("LMPSubversion: {0}", radio.LMPSubversion);
  21:                      Console.WriteLine("DeviceClass: {0}", radio.DeviceClass);
  22:                  }
  23:              }
  24:              else
  25:              {
  26:                  Console.WriteLine("Unable to enumerate BTH radios");
  27:              }
  28:          }
  29:      }
  30:  }
Posted on Thursday, March 29, 2007 2:28 PM .NET Framework , Development | Back to top


Comments on this post: WinToolZone.Bluetooth - Managed Bluetooth API for the desktop

# is it available
Requesting Gravatar...
is this lib available for download?

thank you
Left by samy k abushanab on Jun 10, 2007 10:13 AM

Your comment:
 (will show your gravatar)


Copyright © Gaurav Khanna | Powered by: GeeksWithBlogs.net