Solved

VB can't find Fortran DLL file

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now