Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to use mayOpen(filename,"r") in a C++ dll.
But when I create a dll and load it in Delphi, I get access violation error is appeared.

I think matOpen causes the error. How can I use matOpen in a dll application in C++?
Posted
Updated 25-Oct-10 4:08am
v2
Comments
Yusuf 25-Oct-10 11:33am    
Did you consult the MathLab help? Or any related online resources?

1 solution

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).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900