Solved

VB can't find Fortran DLL file

Posted on 1997-07-10
5
330 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
  • 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 100 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

803 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