社区
Windows SDK/API
帖子详情
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 怎么声明?
...全文
133
4
打赏
收藏
Delphi调用VC的dll问题?
VC里是这么调用的 typedef void* JL_HANDLE; int JL_TCPLogin ( LPCTSTR strHost, int nPort, LPCTSTR strUserId, LPCTSTR strPassword, int nType, JL_HANDLE* pRtnHandle /*OUT*/); 我想问问用delphi 怎么声明?
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用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.
Delphi
调用
VC
生成的
DLL
6. **
Delphi
调用
DLL
**: - 在
Delphi
中,导入
DLL
函数后,可以直接像
调用
本地函数一样
调用
DLL
中的函数,确保参数类型匹配。 -
调用
时需注意错误处理,因为
DLL
函数可能抛出异常或返回错误值。 总结来说,"
Delphi
...
Delphi
调用
VC
DLL
h
Dll
:= LoadLibrary('
VC
DLL
.
dll
'); if h
Dll
<> 0 then begin @AddFunc := GetProcAddress(h
Dll
, 'Add'); if @AddFunc <> nil then try //
调用
函数 Result := AddFunc(3, 5); finally // 不再需要
DLL
时...
delphi
调用
vc
dll
获取返回数据 mac地址
本文将深入探讨如何使用
Delphi
调用
VC
++编写的
DLL
(动态链接库)来获取并处理返回的数据,特别是MAC地址这种特定的信息。 首先,我们需要理解
DLL
的工作原理。
DLL
是一种可执行代码库,它可以被多个程序同时
调用
,共享...
Qt.
VC
调用
delphi
编写的
dll
lib,详细方法
在跨平台的软件开发中,有时我们需要将不同编程语言编写的组件集成在一起,例如使用Qt(C++)或Visual C++(
VC
)
调用
由
Delphi
编译的
DLL
库。
Delphi
以其强大的面向对象特性及易用性,在创建高效、快速的Windows应用...
VC
的
DLL
类导出后,用
Delphi
调用
方法及源码
3. **
Delphi
调用
C++
DLL
**: 在
Delphi
中,我们首先需要定义一个与
VC
导出类匹配的接口。这个接口应该包括相同的方法签名,但类型转换可能会有所不同,因为C++和
Delphi
的数据类型不完全相同。例如,C++的`int`对应于...
Windows SDK/API
1,183
社区成员
22,328
社区内容
发帖
与我相关
我的任务
Windows SDK/API
Delphi Windows SDK/API
复制链接
扫一扫
分享
社区描述
Delphi Windows SDK/API
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章