locked
How disable/enable Bluetooth and Wifi in WM6.5 (NET.C#) RRS feed

  • Question

  • I have built application and I need inside it disable/enable Bluetooth and WiFi.

    I found how enable BT but I do not know how disable it :( because HTC HD2 has broadcomm stack and there is not API for enable/disable :( When I import DLL  I can only enable BT.

    I think I need more standard solution for all WM devices and stack.


    Robert Stuczynski (Noise) - Blog: http://noiserobert.spaces.live.com/
    Tuesday, September 21, 2010 11:56 AM

Answers

  • For bluetooth, you can use the bluetooth application development API: http://msdn.microsoft.com/en-us/library/aa916499.aspx

    For WiFi, you can use the device power management API: http://msdn.microsoft.com/en-us/library/ee497756.aspx

    For a single API that does both, you can use the (unsupported) OSSVCS ChangeRadioState() function.

     

    An example of all 3 methods:

    http://www.codeproject.com/KB/windows/RadioPower.aspx

     

    (You will need to P/Invoke those methods to use them in C#)

     

    -PaulH

    Tuesday, September 21, 2010 3:07 PM

All replies

  • For bluetooth, you can use the bluetooth application development API: http://msdn.microsoft.com/en-us/library/aa916499.aspx

    For WiFi, you can use the device power management API: http://msdn.microsoft.com/en-us/library/ee497756.aspx

    For a single API that does both, you can use the (unsupported) OSSVCS ChangeRadioState() function.

     

    An example of all 3 methods:

    http://www.codeproject.com/KB/windows/RadioPower.aspx

     

    (You will need to P/Invoke those methods to use them in C#)

     

    -PaulH

    Tuesday, September 21, 2010 3:07 PM
  • thanks. I must check it but look fine!
    Robert Stuczynski (Noise) - Blog: http://noiserobert.spaces.live.com/
    Friday, September 24, 2010 6:54 AM