问下,c++的这个函数,pb调用的时候该怎么声明函数呢

Drayne 2017-11-30 09:57:21
int ReadInterface(IN const long ntype,
IN const char * InputParams,
OUT char * OutParams)

我写成
Function int ReadInterface(long ntype, string InputParams, ref string outtParams) Library "***.dll";

调用的时候,

error:specified argument type differs from required argument type at runtime in dll function readinterface (invalid stack pointer on rreturn from function call)

但是跟踪程序,能看见 outparams 已经有正确的值了
...全文
582 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Drayne 2017-12-11
  • 打赏
  • 举报
回复
我用long 也是没成功,后来发现应该是 dll的问题, pb 要求是stdcall 这种
kenshu 2017-12-10
  • 打赏
  • 举报
回复
参数定义没问题,但InputParams一般大家都声明为ref 返回值用long,而不是int

1,075

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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