繁体   English   中英

在Windows XP C#代码上启用/禁用蓝牙

[英]Enable/Disable bluetooth on windows xp c# code

我发现使用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,
}

不要让“无线电”一词误导您...

如果它应在台式机上运行,​​则可以使用无线通信库.NET版

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM