Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

BluetoothGetRadioInfo (irprops)
 
.
Summary
Gets information on the radio (i.e. the local device attached to the user's computer)

C# Signature:

[DllImport("irprops.cpl", SetLastError=true)]
static extern TODO BluetoothGetRadioInfo(TODO);

VB Signature:

    <DllImport("irprops.cpl", setlasterror:=True, CharSet:=CharSet.Auto)> _
    Private Shared Function BluetoothGetRadioInfo( _
    ByVal hRadio As IntPtr, _
    ByRef pRadioInfo As BluetoothRadioInfo) As UInteger
    End Function

User-Defined Types:

    Private Const BLUETOOTH_MAX_NAME_SIZE = 248

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, pack:=1)> _
    Friend Structure BluetoothRadioInfo
        Public size As UInteger
        Public address As BluetoothAddress
        <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=BLUETOOTH_MAX_NAME_SIZE)> _
        Public name As String
        Public classofDevice As UInteger
        Public subversion As UShort
        Public manufacturer As UShort
        Public Sub Initialize()
            Me.name = New String("*"c, BLUETOOTH_MAX_NAME_SIZE)
            Me.address = New BluetoothAddress
            Me.size = Marshal.SizeOf(Me)
        End Sub
    End Structure

    ' Needs some tidying up...
    <StructLayout(LayoutKind.Sequential, pack:=1)> _
    Friend Structure BluetoothAddress
        Public byte1 As Byte
        Public byte2 As Byte
        Public byte3 As Byte
        Public byte4 As Byte
        Public byte5 As Byte    
        Public byte6 As Byte    
        Public byte7 As Byte    
        Public byte8 As Byte    
        Public byte9 As Byte    
        Public byte10 As Byte      
        Public byte11 As Byte
        Public byte12 As Byte
        Public Overrides Function ToString() As String
            ' The useful bytes...
            Return String.Format("{0}:{1}:{2}:{3}:{4}:{5}", _
            byte10.ToString("x"), byte9.ToString("x"), byte8.ToString("x"), _
            byte7.ToString("x"), byte6.ToString("x"), byte5.ToString("x"))
        End Function
    End Structure

Alternative Managed API:

http://32feet.net/

Notes:

XP SP1 required.

See the platform SDK.

It's cpl not dll!

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions