Delphi调用VC的dll问题?

hotboy1000 2004-11-11 02:59:26
VC里是这么调用的
typedef void* JL_HANDLE;
int JL_TCPLogin (
LPCTSTR strHost, int nPort,
LPCTSTR strUserId, LPCTSTR strPassword,
int nType,
JL_HANDLE* pRtnHandle /*OUT*/);
我想问问用delphi 怎么声明?
...全文
126 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
beyondtkl 2004-11-23
  • 打赏
  • 举报
回复
哦 警告的行数??
你可以 再 Pointer(PChar(.))这样转换
hotboy1000 2004-11-23
  • 打赏
  • 举报
回复
我在动态调用dll的时候会出现这些警告是不是正常的
[Warning] Unit1.pas(74): Unsafe type 'PChar'
[Warning] Unit1.pas(164): Unsafe type 'PChar'
[Warning] Unit1.pas(168): Unsafe code '@ operator'
[Warning] Unit1.pas(169): Unsafe code '@ operator'
Behard 2004-11-11
  • 打赏
  • 举报
回复
查一下 FAQ 先嘛
beyondtkl 2004-11-11
  • 打赏
  • 举报
回复
typedef void* JL_HANDLE; JL_HANDLE -> Pointer;
int JL_TCPLogin (
LPCTSTR strHost, int nPort,
LPCTSTR strUserId, LPCTSTR strPassword,
int nType,
JL_HANDLE* pRtnHandle /*OUT*/);
->
function JL_TCPLogin (strHost:PChar; nPort:Integer;strUserId:PChar;strPassword:PChar;
nType:Integer; pRtnHandle:PPointer):Integer;stdcall; external '**.dll';name 'JL_TCPLogin'

如不行就用 cdecl.

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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