- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to make very simple DLL using Fortran 7.019 inside of Visual Studio 6.0.
When I created the project, I made it an empty dll.
My file is named main.for and created dll named main.dll.
function mult1(x, y)
mult1 = x * y
end
It compiles and makes dll 'main.dll' with no errors.
When I try to call from very simple VB app, I get
Run time error '453'
Can't find dll entry point mult1 in c: ewdllmain.dll
I get very similar error if I try to register with regsvr32.
VB 6. app
Private declare Function mult1 Lib "c: ewexemain.dll" Byval x as double, Byval y as double)
Private Sub Form_Load()
Dim x1 as Double
Dim x2 as Double
Dim x3 as Double
x1 = 2.1
x2 = 3.256
x3 = mult1(x1, x2)
End Sub
please advise
When I created the project, I made it an empty dll.
My file is named main.for and created dll named main.dll.
function mult1(x, y)
mult1 = x * y
end
It compiles and makes dll 'main.dll' with no errors.
When I try to call from very simple VB app, I get
Run time error '453'
Can't find dll entry point mult1 in c: ewdllmain.dll
I get very similar error if I try to register with regsvr32.
VB 6. app
Private declare Function mult1 Lib "c: ewexemain.dll" Byval x as double, Byval y as double)
Private Sub Form_Load()
Dim x1 as Double
Dim x2 as Double
Dim x3 as Double
x1 = 2.1
x2 = 3.256
x3 = mult1(x1, x2)
End Sub
please advise
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[pre]
function mult1(x, y)
!DEC$ATTRIBUTES DLLEXPORT, ALIAS: "mult1":: mult1
mult1 = x * y
end
!
!VB 6. app
Private declare Function mult1 Lib "c: ewexemain.dll" ByRef x as Single, ByRef y as Single) as Single
function mult1(x, y)
!DEC$ATTRIBUTES DLLEXPORT, ALIAS: "mult1":: mult1
mult1 = x * y
end
!
!VB 6. app
Private declare Function mult1 Lib "c: ewexemain.dll" ByRef x as Single, ByRef y as Single) as Single
Is it better now :-)? If you need doubles, you have to declare mult1, x, and y as DOUBLE PRECISION in Fortran code.
Jugoslav
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page