bidondon
New member
- Dec 9, 2005
- 1
Hi!
I'm a fortran beginner. Now i'm using DVF 6. And I want to creat a user interface for my for. program by VB6. I have done an example from several references, but It doesn't work.
First, I created a Fortran project as dll project type.
My fortran code is below:
======================
subroutine pro1( a, b, c )
!DEC$ ATTRIBUTES DLLEXPORT :: pro1
!DEC$ ATTRIBUTES ALIAS : 'pro1' :: pro1
integer a,b,c
c=a+b
end subroutine
==========================
Then, I run fortran and a pro1.dll file was created.
after that, I created a vb project. I copied also the dll file into the same directory with the vb project.
code vb:
Private Declare Sub pro1 Lib "pro1.dll" _
(a As interger, b as integer, c As integer)
Private Sub cmdbut_Click()
Dim c As integer
call pro1(3,4,c)
txt1.text=cstr(c)
End Sub
=================
When i run vb program, there was a error: "can not find the entry point pro1 dll".
Could you help me?
I'm a fortran beginner. Now i'm using DVF 6. And I want to creat a user interface for my for. program by VB6. I have done an example from several references, but It doesn't work.
First, I created a Fortran project as dll project type.
My fortran code is below:
======================
subroutine pro1( a, b, c )
!DEC$ ATTRIBUTES DLLEXPORT :: pro1
!DEC$ ATTRIBUTES ALIAS : 'pro1' :: pro1
integer a,b,c
c=a+b
end subroutine
==========================
Then, I run fortran and a pro1.dll file was created.
after that, I created a vb project. I copied also the dll file into the same directory with the vb project.
code vb:
Private Declare Sub pro1 Lib "pro1.dll" _
(a As interger, b as integer, c As integer)
Private Sub cmdbut_Click()
Dim c As integer
call pro1(3,4,c)
txt1.text=cstr(c)
End Sub
=================
When i run vb program, there was a error: "can not find the entry point pro1 dll".
Could you help me?