0
我發現Bluetooth Device Development using C#,但我想要的是可以控制Windows XP藍牙的代碼。使用C#代碼打開或關閉它。啓用/禁用Windows XP上的藍牙c#代碼
我發現Bluetooth Device Development using C#,但我想要的是可以控制Windows XP藍牙的代碼。使用C#代碼打開或關閉它。啓用/禁用Windows XP上的藍牙c#代碼
經過短暫的「谷歌搜索」我發現:
[DllImport("BthUtil.dll")]
private static extern int BthSetMode(RadioMode dwMode);
[DllImport("BthUtil.dll")]
private static extern int BthGetMode(ref RadioMode dwMode);
/// Bluetooth states.
public enum RadioMode
{
/// Bluetooth off.
Off,
/// Bluetooth is on but not discoverable.
On,
/// Bluetooth is on and discoverable.
Discoverable,
}
不要讓這個詞「單選」誤導你......
如果要在臺式PC上運行,你可以使用Wireless Communication Library .NET Edition
但該代碼僅適用於Windows Mobile ...我需要示例代碼來顯示藍牙啓用/禁用我的Windows XP。我可能希望代碼可以在不使用Windows Mobile參考的情況下使用。 – rose
@玫瑰:您正在尋找臺式機上的解決方案? – Fischermaen
意思是在我的Windows XP上的筆記本電腦...是的 – rose