[英]C#: Find out if the Bluetooth adapter is turned On/Off + the type of the STACK used (Programmatically)
如何以編程方式告訴我們,如果這是該代碼在運行設備,藍牙適配器打開或 關閉 ?
諸如使用32feet的 “ cli.DiscoverDevices()
”之類的發現方法只返回在兩種情況下都找不到的設備
此外,我知道在Windows中使用device manager
查找一種藍牙堆棧的可視方法,但是想知道是否可以在代碼中識別。
https://32feet.codeplex.com/wikipage?title=Local%20Radio%20Information
例如, BluetoothRadio.Mode
和最新開發版本中的Modes
。
離開我頭頂的唯一方法是檢查設備電源狀態。 這里有關於電源狀態的正確寫法:
http://msdn.microsoft.com/en-us/library/windows/hardware/ff554397(v=vs.85).aspx
您將需要使用pinvoke作為管理電源狀態的唯一方法是通過本機代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.