Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

thread102-1211995

Status
Not open for further replies.

emeceuy

Programmer
Aug 2, 2007
1
UY
I have found that ther problem I have is like the post linked (thread102-1211995), but in the final answer is said that the problem is the class, but I dont understand how can i solve it.

Its the same problem I have. I have to call from Delphi a DLL created in MatLab, but some errors ocurred, like acces violation, or if I call the function in the DLL with its name, a message is displayed saying that this name doesnt exist, like in the other thread.

the dll in matlab is like this:
function B=suma(A);
B=A+1;

the function in delphi is like this:
function sumauno(A:integer):integer; stdcall; external 'suma.dll' index 1;

in this case it compiles ok, but doesnt work... the result is NAN or a very big number, like 200.000.000

function sumauno(A:integer):integer; stdcall; external 'suma.dll' name 'suma';

this should work, but it doesent... it says that "suma" (the name of the function in the dll) not found

:( can anyone help me? I really need to make it work, but I cant !!! thank you all in advance



this function compiles ok,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top