兵马俑的笔记 https://passport2.21ic.com/?43124 [收藏] [复制] [RSS]

日志

利用RAPI控制PPC

已有 1381 次阅读2006-9-12 10:21 |个人分类:随手涂鸦

在DELPHI下利用RAPI.DLL成功实现PC与PPC设备的文件传输。


几个主要RAPI函数的DELPHI声明:


function CeRapiInit(): integer; stdcall; external 'RAPI.DLL';


function CeRapiUninit(): integer; stdcall; external 'RAPI.DLL';


function CeCreateFile(lpFileName: WideString; dwDesiredAccess: cardinal; dwShareMode: cardinal; lpSecurityAttributes: pSecurityAttributes;
  dwCreationDisposition: cardinal; dwFlagsAndAttributes: cardinal; hTemplateFile: cardinal): cardinal; stdcall; external 'RAPI.DLL';


function CeReadFile(hFile: cardinal; var lpBuffer; nNumberOfBytesToRead: cardinal;
  var lpNumberOfBytesRead: cardinal; lpOverlapped: poverlapped): bool; stdcall; external 'RAPI.DLL';


function CeWriteFile(hFile: cardinal; const lpBuffer; nNumberOfBytesToWrite: cardinal;
  var lpNumberOfBytesWritten: cardinal; lpOverlapped: poverlapped): bool; stdcall; external 'RAPI.DLL';


function CeCloseHandle(IntPtr: thandle): integer; stdcall; external 'RAPI.DLL';


路过

鸡蛋

鲜花

握手

雷人

发表评论 评论 (1 个评论)

张华建 2007-1-25 15:12
你好,看到你的文章感觉眼前一亮。 最近在查找这方面的资料,就是在delphi环境下能够对PDA文件进行 读写、创建、删除等操作。希望向您学习。 我的邮箱: huajian-@163.com QQ 号码: 279197511 不知怎么联系?