DLL中动态参数函数的调用

Ssm 2002-09-17 10:08:22
我用BCB写了一个动态链接库SsmDLL.dll,其中一个函数是动态参数的
void stdcall __decelspec(dllexport) test(const char * format,...)
,请问如何在Delphi中声明该函数的引用
...全文
127 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
Ssm 2002-09-18
  • 打赏
  • 举报
回复
为什么没有人回答 ;-<
michael_king 2002-09-17
  • 打赏
  • 举报
回复
procedure Test(const char * format,...);Cdecl;external 'IC232.DLL';
Ssm 2002-09-17
  • 打赏
  • 举报
回复
在Delphi中的调用方法呢?
thyong 2002-09-17
  • 打赏
  • 举报
回复
void test(const char * format,...)
StdCall external 'IC232.DLL';

不需要什么单元,你把DLL放到同一目录下就可以了
Ssm 2002-09-17
  • 打赏
  • 举报
回复
在uses中是否还需要包含什么单元? daniel007(添) 所提供的方法我早就试过,可是编译通不过。
daniel007 2002-09-17
  • 打赏
  • 举报
回复
procedure test(format: PChar,...); stdcall;
Ssm 2002-09-17
  • 打赏
  • 举报
回复
能否详细?谢先!
ybbob 2002-09-17
  • 打赏
  • 举报
回复
external 'IC232.DLL';
var form,tform
procedure test(const Format:pchar;const Args:array of const);stdcall;
Ssm 2002-09-17
  • 打赏
  • 举报
回复
我觉得,大家的所有思想是从C出发的。
关于DLL的一些基本调用我相信不成问题。
关键是,我不知道在Dephi(pascal)中是否支持 ...,我从VCL源码在看到Format是如下声明的:
function Format(const Format: string; const Args: array of const): string;
我也尝试了像这样的静态调用声明,
procedure test(const Format:pchar;const Args:array of const);stdcall;external 'SsmDLL.dll';
可是老是报“在DLL中不能定位test函数”

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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