外部dll最后一個引數為結構體,定義如下:
typedef struct TagData_struct{
double value; //回傳點的數值
long time; //回傳點的時間,秒
int status; //回傳點的狀態
}TagData;
在pb中宣告函式如下:Function int GetHistoryDataByTime(ref string tagname,long bytime,ref TagData tag) Library "***.dll"
pb中宣告的結構體與dll中相同
呼叫時報錯:Error: Specified argument type differs from required argument type at runtime in DLL function
請教大家該如何解決?論壇搜了許多,也沒有查到相關解決辦法。
uj5u.com熱心網友回復:
https://bbs.csdn.net/topics/200028452這個帖子也看了,與我的問題類似轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/14753.html
標籤:API 調用
下一篇:PB 使用dw2xls報錯
