蓝牙应用C# [英] Bluethooth Application C#
本文介绍了蓝牙应用C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我正在开发C#WinApp来搜索并连接附近的bluethooth。
因此我从32feet下载了所需的dll。 net。
但我收到以下错误 -
Hello,
I am devloping C# WinApp to search and connect nearby bluethooth.
Hence I have downloaded required dll from 32feet.net.
But I am getting below error -
Unable to load DLL 'coredll.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
有时
AND sometimes
The type initializer for 'InTheHand.Net.Sockets.BluetoothClient' threw an exception.
我有以下代码 -
I have below code-
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using InTheHand.Net;
using InTheHand.Net.Sockets;
using InTheHand.Net.Bluetooth;
using InTheHand.Net.Ports;
namespace Bluethoot_Connet
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Clear();
BluetoothClient bc = new BluetoothClient();
BluetoothDeviceInfo[] divices = bc.DiscoverDevices(5);
for (int i = 0; i < divices.Length; i++)
{
textBox1.Text = textBox1.Text + Environment.NewLine + "Name : " + divices[i].DeviceName + " Add : " + divices[i].DeviceAddress;
}
}
}
}
推荐答案
试试
P2P(pc到pc)传输系统C4F项目工具包
Try
P2P(pc to pc) transfer system C4F Project kit
这篇关于蓝牙应用C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文