如何在dll中使用MatOpen? [英] How to use MatOpen in dll?
本文介绍了如何在dll中使用MatOpen?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在C ++ dll中使用mayOpen(filename,"r")
.
但是当我创建一个dll并将其加载到Delphi中时,出现访问冲突错误.
我认为matOpen
导致了错误.如何在C ++的dll应用程序中使用matOpen
?
I want to use mayOpen(filename,"r")
in a C++ dll.
But when I create a dll and load it in Delp I get access violation error is appeared.
I think matOpen
causes the error. How can I use matOpen
in a dll application in C++?
推荐答案
在调用 C/C ++ 时应注意的第一件事 Delphi 中的代码是调用约定: C/C ++ 函数通常使用 ^ ],但是 Delphi 很可能使用__stdcall [
The first thing you should be aware in calling C/C++ code from Delphi is the calling convention: C/C++ functions usually use the __cdecl calling convention[^], but Delphi very probably uses the __stdcall[^] calling convention (which is the standard for the Pascal language).
这篇关于如何在dll中使用MatOpen?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文