?
Solved

VB can't find Fortran DLL file

Posted on 1997-07-10
5
Medium Priority
?
339 Views
Last Modified: 2013-11-08
I have recently upgraded to VB 5 and Visual Fortran from VB4 and Fortran powerstation.  A VB program that I upgraded is supposed to call subroutines in two Fortran DLL's that I wrote.  (All this worked before I upgraded my compilers.)  Now the VB gives me a 'File not found' error when ever I try to call a function from my DLLs.  I have tried putting the DLL various places (windows/sys; in the .exe directory; etc.), including giving it a full path name when I declare it in VB.  Why can't the VB find my DLL?
0
Comment
Question by:als7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:cymbolic
ID: 1428197
If you haven't done so already, use notepad to view your project file and see if their aren't some conflicting references in it.  If so, just delete them and then your new declarations in VB should take precedence.
0
 

Author Comment

by:als7
ID: 1428198
I looked in the *.vbp file and I couldn't see any conflicting references.
0
 
LVL 3

Accepted Solution

by:
vmpn earned 200 total points
ID: 1428199
If you use 16bit version of VB4 and DLL's writen in Fortran for 16bit, since VB5 is 32bit application it may not recognize the 16bit DLL.

If I am wrong please provide the DECLARE Statments from your program and the name(s) of DLL you use.

Sincerely,
VMPN
0
 

Author Comment

by:als7
ID: 1428200
My previous VB program and DLL were both 32-bit, as are the current ones.  Here is my declaration:

Public Declare Sub Write_Chain Lib "d:\vb32prj\fm3new\drawchan.dll" _
 Alias "_WRITE_CHAIN@24" (ByVal nuke$, l1&, ByVal Temp_Path$, l2&, ByVal Perm_Path$, l3&)

The dll name is 'drawchan.dll'.
0
 
LVL 3

Expert Comment

by:vmpn
ID: 1428201
Here is your problem you "d:\vb32prj\fm3new\drawchan.dll" _
                                                 Alias "_WRITE_CHAIN@24" (ByVal nuke$, l1&, ByVal Temp_Path$, l2&, ByVal Perm_Path$, l3&)

but it should be:
"d:\vb32prj\fm3new\drawchan.dll" _ function_name
                                                 Alias "_WRITE_CHAIN@24" (ByVal nuke$, l1&, ByVal
                                               Temp_Path$, l2&, ByVal Perm_Path$, l3&)

Sincerely,
VMPN
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question