Bluetooth Activated

Bluetooth Activated

Postby pablovidal » Thu Nov 12, 2009 2:14 pm

Greetings,

FWPCC a way that can be activated from the bluetooth if this is off


Code: Select all  Expand view
public class BlueTooth

{

private enum BluetoothMode : int

{

Off = 0, //Turn off the Bluetooth radio.

Connectable = 1, //Turn on the Bluetooth radio, and make it connectable.

Discoverable = 2 //Turn on the Bluetooth radio, and make it both connectable and discoverable.

};

[DllImport("BthUtil.dll")]

private static extern int BthSetMode(BluetoothMode mode);

public static bool EnableBT()

{

return (BthSetMode(BluetoothMode.Connectable) == 0);

}

public static bool DisableBT()

{

return (BthSetMode(BluetoothMode.Off) == 0);

}

}
 
Saludos,

Pablo Alberto Vidal
/*
------------------------------------------------------
Harbour 3.2.0, Fivewin 17.02, BCC7
------------------------------------------------------
*/
User avatar
pablovidal
 
Posts: 401
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana

Re: Bluetooth Activated

Postby pablovidal » Fri Nov 13, 2009 1:14 am

Saludos,

Pablo Alberto Vidal
/*
------------------------------------------------------
Harbour 3.2.0, Fivewin 17.02, BCC7
------------------------------------------------------
*/
User avatar
pablovidal
 
Posts: 401
Joined: Thu Oct 06, 2005 10:15 pm
Location: Republica Dominicana

Re: Bluetooth Activated

Postby Otto » Fri Nov 13, 2009 11:17 am

Hello Pablo,

thank you for the code.
Maybe you also have a soltion for WiFi ON/OFF.

Thanks in advance,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 7 guests