|
-
October 19th, 1998, 01:51 PM
#1
dll entry point
Hi,
I am trying to access a DLL writen in Fortran. Unfortunately, whenever the VB module attempts to communicate with the DLL I get run-timr error 453 and this message 'cannot find the DLL entry point'
The code for the VB and Fortran modules are listed below. I will appreciate your help.
Riak
Option Explicit
Private Type StringArray
strings As String * 24
End Type
Private Declare Sub FORSTRARR Lib "E:VB\fortVB.dll" (Myarray As
StringArray)
Private Sub Command1_Click()
Dim I As Integer
Static arr(1 To 5) As StringArray
Call FORSTRARR(arr(1))
For I% = 1 To 5
text1.Text = arr(I%).strings + Chr$(13) + Chr$(10) + text1.Text
Next I%
End Sub
The fortran DLL contains the following code
SUBROUTINE forstrarr(arr)
CHARACTER(24) arr(5)
arr = "This is a string from Fortran."
END SUBROUTINE
-
October 20th, 1998, 12:03 PM
#2
Re: dll entry point
the one thing i know that may be relevant is that to call a function in a dll from vb the function must use the pascal calling convention. i don't know fortran, but if it doesn't use pcc then it won't work.
-
October 28th, 1998, 08:15 PM
#3
Re: dll entry point
When you make a dll in any other language buy VB, you have to do something in the code to make it export the function someohow... in C/C++ you would add a few lines to the header file and prefix EXPORT infront of your function name. I dont know fortran so I couldn't tell you how to do it in that language.
-
December 28th, 1999, 12:56 AM
#4
Re: dll entry point
Hi,
I too face the same probs when i try to access a VB DLL from an VB EXE Being a VC++ programmer i can understand that the function in a DLL has to be exported and i being a VB learner i don't know how to export a function from a VB DLL so that i can access that from VB EXE File.
Any help will be of Very much Use to Me.
Being a Newbie to this site i would like to sent a copy to [email protected].
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|