Solved

VB can't find Fortran DLL file

Posted on 1997-07-10
5
331 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
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.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.

856 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