powerbuilder 不能调用我用bcb写的dll

xjq2003 2010-04-14 12:18:40
出现下面错误

Application terminated.
Error:Error opening dll library lib\hbwtsys_dll.dll for external function at line 1 in function init of
object weightlib

不知道有哪位遇到过这种情况吗
我的函数定义:
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_AdjCarDataForAxisID(int nPos,int nCmd,int nAxisPos);
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_SetDataValid(int nPos,int nCmd);
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_GetWeightData(int nPos);
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_ModiAxisType(int nPos,int nAxisType);
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_ModiAxisNum(int nPos,int nCmd,int nAxisPos,int nAxisType,int nWeight);
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_GetAxisCount (int nPos);
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_GetAxisData (int nPos,long nAxisID,long* nAxisType,long* nWeight);
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_SingleAxialCount(int nPos);
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_Speed (int nPos,int *pSpeed, int *pAcceleration);

extern "C" __declspec(dllexport) __int64 _cdecl WtSys_ModifyVehInfo(int nPos,int nAxisType,long nWeight);
extern "C" __declspec(dllexport) __int64 _cdecl WtSys_AppendVehInfo(int nAxisType,long nWeight);
...全文
91 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
xjq2003 2010-04-15
  • 打赏
  • 举报
回复
谢谢各位的回复,等等马上结贴,呵呵
xjq2003 2010-04-15
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 behard 的回复:]
是本身有没有使用 BCB 调用测试过呀?

你给出的信息太少了,不知道如何定位问题
[/Quote]
bcb写的测试程序没有问题,所以函数我都测试过了,

现在安装__stdcall试试看了
ccrun.com 2010-04-15
  • 打赏
  • 举报
回复
可能是参数压栈顺序的问题,用__stdcall试试。
Behard 2010-04-14
  • 打赏
  • 举报
回复
是本身有没有使用 BCB 调用测试过呀?

你给出的信息太少了,不知道如何定位问题
xjq2003 2010-04-14
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 keiy 的回复:]
没看到图片,
就你的错误来看,是打开DLL出错了
1.查你PB调用DLL的路径
2.查你的DLL是否包括第三控件
3.PB支持64位了吗?
[/Quote]
路径没有问题,dll没有包括第三方控件,
使用的xp系统
柯本 2010-04-14
  • 打赏
  • 举报
回复
没看到图片,
就你的错误来看,是打开DLL出错了
1.查你PB调用DLL的路径
2.查你的DLL是否包括第三控件
3.PB支持64位了吗?
YeBinYe 2010-04-14
  • 打赏
  • 举报
回复
用标准调用方式__stdcall如:
extern "C" __declspec(dllexport) __int64 _stdcall WtSys_AdjCarDataForAxisID(int nPos,int nCmd,int nAxisPos);可以用

1,221

社区成员

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

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