USB
データを送信するために、電話デバイスをサーバーに接続しようとしています。
これは私RAPI
のコードです。
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;
using OpenNETCF.Desktop.Communication;
OpenNETCF.Desktop.Communication
次の手順に従って追加しました。
- ソリューション エクスプローラー ウィンドウで、[参照設定] フォルダーを右クリックします。ポップアップ メニューが表示されます。
- メニューから [参照の追加] を選択します。
- [参照の追加] ダイアログ ボックスが表示されます。OpenNETCF.Desktop.Communication コンポーネントを選択します。
- [OK] ボタンをクリックして、選択したコンポーネントをプロジェクトに追加します。
そして、これは私のコードです:
private void BTN_LEVANTAMIENTO_Click(object sender, EventArgs e)
{
try
{
RAPI myrapi = new RAPI(); //Is it Okay?
myrapi.Connect();
while (!myrapi.DevicePresent)
{
MessageBox.Show("Please connect your device to your PC using ActiveSync and before clicking the OK button.",
"No Device Present");
//myrapi.Connect();
}
}
catch (Exception ex)
{
MessageBox.Show("The following error occurred while attempting to connect to" + " your device - " + ex.Message,
"Connection Error");
Application.Exit();
}
それが私に示す問題は
"No se puede encontrar el archivo DLL PInvoke kernel32.dll c#"
私に何ができるかについて何か考えはありますか?