OpenNETCF.Desktop.Communication.zip
PC와 PDA 간 Active Sync 연결된 상태에서 PC에 있는 파일을 PDA로 또는 PDA에 있는 파일을 PC로 복사 할 경우 사용하는 예제 소스이며,
첨부 파일은 RAPI DLL 파일이며, 압축 해제 후 참조 추가 후 개발하면 됩니다.
참고로 윈폼 프로젝트입니다.
using OpenNETCF.Desktop.Communication;
private void button1_Click(object sender, EventArgs e)
{
//PC→PDA 복사
RAPI rApi = new RAPI();
if (!rApi.DevicePresent)
{
MessageBox.Show("PC와 PDA 연결이 되지 않았습니다.");
return;
}
if (!rApi.Connected) rApi.Connect();
rApi.CopyFileToDevice("C:\\test.txt", Path.Combine(@"\PocketStore\", "test.txt"), true);//PDA로 파일 복사
}
private void button2_Click(object sender, EventArgs e)
{
//PDA->PC 복사
RAPI rApi = new RAPI();
if (!rApi.DevicePresent)
{
MessageBox.Show("PC와 PDA 연결이 되지 않았습니다.");
return;
}
if (!rApi.Connected) rApi.Connect();
rApi.CopyFileFromDevice("C:\\test1.txt", Path.Combine(@"\PocketStore\", "test1.txt"), true);//PC로 파일 복사 완료
rApi.DeleteDeviceFile(Path.Combine(@"\PocketStore\", "test1.txt"));//PDA 파일 삭제
}
'C#' 카테고리의 다른 글
[C#/PDA]PDA에서 바로가기 아이콘 만들기 예제 (0) | 2016.01.21 |
---|---|
[C#/PDA]PDA 프로그램 중복 실행 방지 예제 (0) | 2016.01.21 |
[C#]프린터 출력 및 페이지 설정 예제 소스 (0) | 2016.01.21 |
[C#/PDA]키보드 IME MODE 변환 예제 소스 (0) | 2016.01.21 |
[C#/PDA]ComboBox Binding 예제 소스 (0) | 2016.01.21 |