顾客显示屏的使用,需要用到其本身的动态连接库。请翻译三个函数,谢谢!

李志林HZ 2004-11-13 03:08:26
如题,函数如下:
function com_init(com:Integer;baud:Dword):Boolean;stdcall;external 'api_com.dll';

function com_rest:Boolean;stdcall;external 'api_com.dll';

function com_send(buf:PChar;len:Integer):Boolean;stdcall;external 'api_com.dll'

请帮忙翻译成BCB里面能使用的函数,谢谢!
...全文
139 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
李志林HZ 2004-11-14
  • 打赏
  • 举报
回复
谢谢!
beyondtkl 2004-11-13
  • 打赏
  • 举报
回复
寒 写反了。。

typedef bool (__stdcall *PCOM_INIT)(int com, DWORD baud);
typedef bool (__stdcall *PCOM_REST)(void);
typedef bool (__stdcall *PCOM_SEND)(char* buf; int len);
beyondtkl 2004-11-13
  • 打赏
  • 举报
回复
typedef bool (__stdcall PCOM_INIT*)(int com, DWORD baud);
typedef bool (__stdcall PCOM_REST*)(void);
typedef bool (__stdcall PCOM_SEND*)(char* buf; int len);

定义了函数指针后 就LoadLibrary ..GetProcAddress..OK

没用过BCB 上面是VC的写法 不过也该差不多。。

1,594

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧