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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dll call problem. Urgent Help 1

Status
Not open for further replies.
Oct 22, 2001
215
0
0
US
Please some one help me: I made a fortran dll and am trying to call it from a VB (6) program and am getting the following Runtime error (455): Can't Find DLL entry point DLL_OUT in C;\test\file.dll

What am I missing>?
Here is the code:
Private Sub Command1_Click()

num1 = InputBox("Please enter number 1:")
num2 = InputBox("Please enter number 2:")

'Static STR_IN As String * 10, STR_OUT As String * 20

'Rem Pass lengths of string arguments

Call total1(num1, num2, total)

TextBox1.Text = total

End Sub
Declare Sub total1 Lib "C:\TryVB\myDLL\Debug\myDLL.dll" (ByRef num1 As Integer, ByRef num2 As Integer, ByRef total As Integer)
fortran:
subroutine total1(num1,num2,total)
integer num1,num2,total
total = num1 + num2
write(*,*)total
end
 
Not sure how you create a dll with the fortran compiler;
although I'm sure it's similiar to other languages; but
I assume your functions in the fortran dll are not being
exported - so VB can't see them.

If the fortran comiler creates COM/ActiveX dlls, and
doesn't export the dll functions - as VB does - you'll
to use a OLE control to house the fortran dll in VB.

Just some thoughts.

Darrell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top