C中的函数声明是这样的DAQmxReadCounterScalarU32 (TaskHandle taskHandle, float64 timeout, uInt32 *value, bool32 *reserved);DELPHI中 function DAQmxReadCounterScalarU32(AtaskHandle:TaskHandle;TimeOut:Double;Value:PBool32;Reserved:Pbool32):Integer;stdcall;external 'nicaiu.dll'
bool32=Cardinal ;
PBool32=^bool32 ;
上述这样声明以后,老是提示'Invalid pointer operation',很痛苦不知道怎么办,我后来把Cardinal指针类型改为PInteger类型,也不可以
bool32=Cardinal ;
PBool32=^bool32 ;
上述这样声明以后,老是提示'Invalid pointer operation',很痛苦不知道怎么办,我后来把Cardinal指针类型改为PInteger类型,也不可以
解决方案 »
- DELPHI保存EXCEL2000的问题
- 请问如何调试dll
- 关于dbexpress连接ORACLE(8i,9i)的问题 (SOS)
- 100分儿求教dll调用问题
- ------各位大虾:我写了一个CGI的Web Services ,拿到虚拟目录下执行后,产生客户端的WEB WEBSERVICES IMPORT时出现“系统未找到指定的对
- 请问windows自带的cd唱机里放一张cd就自动从internet上下载该cd的信息这个功能怎么实现?最好有源码,谢谢。
- 你们有没有出现这种情况
- sql server 2000 卸载后的重装问题!!
- Delphi,如何用XMLDocument解析XML,得到节点信息。
- 我用Delphi写了个ActiveX组件for ASP,其中一些操作需要Admin权限,该怎么做?
- 使用1..9这9个数字组成一个“两位数×三位数=四位数”的等式,其中各个数字不能重复。
- delphi7中怎么没有MSMQ_TLB.pas
function DAQmxReadCounterScalarU32(AtaskHandle:TaskHandle; TimeOut:Double;var Value:Cardinal;var Reserved:Bool):Integer; stdcall; external 'nicaiu.dll'
不行啊,报引用另外一个DLL错误,Access violation
定义是什么?
估计有可能是调用约定没写对
不知道这个方法楼主试了没。
Seems calling convention is different from stdcall. Can you elaborate more how and using what convention this method is exported in C ?Another thing I would have tried is removing the stdcall convention from delphi declaration. Or would have gone with Explicit Linking option.//Ali