我找到了Bluetooth Device Development using C#,但我想要的是可以控制Windows XP蓝牙的代码。使用C#代码打开或关闭它。
答案 0 :(得分:0)
在短暂的“谷歌搜索”之后我发现:
[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,
}
不要让“无线电”这个词误导你......
如果它应该在台式机上运行,您可以使用Wireless Communication Library .NET Edition