Solved

private dll install...........

Posted on 1998-07-27
17
291 Views
Last Modified: 2013-11-08
the fact....
I have a project with a call to a private dll(in FORTRAN), and i have create an setup for my app(with the setup wizard). Ok, it´s work in the developper computer(where i have developped the app and the dll), but when i teste my installation in anover machine it doesn't work.....when i execute the app it tell´s me that it  can´t fount the external dll(i have tested to copy the dll to the system folder but it doesn't work anyway....)
what´s the problem? do i have to regiter the dl in each computer....? help´s me please........

Thanx in advance, :c)
Mário Guedes
0
Comment
Question by:mguedes
  • 8
  • 4
  • 2
  • +3
17 Comments
 
LVL 6

Expert Comment

by:clifABB
ID: 1466810
Make sure the dll's path isn't hard coded in the VB app:
  Wrong:
    Declare Function Foo Lib "c:\WinNY\System32\Mydll.dll" (ByVal hdc As Long) As Long
  Right:
    Declare Function Foo Lib "Mydll.dll" (ByVal hdc As Long) As Long

Also, you seem to have done so already, make sure your dll is in the Windows\System directory.

I submit this as a comment.  If it solves your problem, let me know and I'll resubmit it as an answer.
0
 

Expert Comment

by:abrooke
ID: 1466811
I'm going out on a limb, but I have experienced the same problem with one of my Visual C++ dlls, most likely you have built the dll as a debug version and do not have the necessary extra files on your other computer to run it in debug version. ReBuild a release version, this should fix your problems.
 
                                          Lonnie Brooke

0
 

Author Comment

by:mguedes
ID: 1466812
I have tested both solution, but it doesn't work anyway.......
0
 

Author Comment

by:mguedes
ID: 1466813
I have tested both solution, but it doesn't work anyway.......
0
 

Expert Comment

by:74wolfgang
ID: 1466814
what´s the original error message ? Have you registered the dll ?
0
 

Author Comment

by:mguedes
ID: 1466815
the original message was "Error:xxx foo.dll file not found". And no i don´t no if the dll was registered in the new machine....i just make the VB setup wizard...
0
 
LVL 1

Expert Comment

by:ChrisH
ID: 1466816
You must register the dll file first.  To do that in the setup wizard, you must add the file at the end and make sure that it registers after any dependent files register.  IE shadow.dll is dependent on sun.dll so sun.dll must install and register in the setup list before the shadow.dll.  You might have to open up the setup list and do this manually because the setup wizard is crued as opposed to using install shield or another program of such sort.
0
 

Author Comment

by:mguedes
ID: 1466817
The setup Wizard detect the dependency and include my dll....and it is at the end of the list. How can i have sure that it registers my DLL? How can i regester my DLL manualy?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 6

Expert Comment

by:clifABB
ID: 1466818
You can register your dll manually by opening a dos box, change directories to your system directory and typing the following:
  regsvr32 foo.dll

most dll's are self registering, though.
0
 

Author Comment

by:mguedes
ID: 1466819
do you no if a dll make with the Visual Fortran(in DevStudio) was self registering ?
I will test your tip and send you the results....
0
 
LVL 1

Expert Comment

by:ChrisH
ID: 1466820
It doesn't matter what dependencies the wizard recognizes in the dependency section.  The truth of the matter is that it still doesn't mean that it will include the files or register them.  You need to add them at the very end where it shows you a list of files and you have a button that you can click to add more files.  If the files don't register when installing, you can register them by using regsvr32.  Go to the dos window, the directory the file is in, and then type regsvr32 the.dll.  If that doesn't work, your dll is being installed in the wrong place, is missing a dependent file (once again don't trust the setup wizard to include dependencies even if it says it recognizes them), or your program is not making the correct reference to the dll.
0
 

Author Comment

by:mguedes
ID: 1466821
But it copy the dll to the install folder in the setup wizard, and to the system(app path) after i run the setup.exe..........
0
 
LVL 1

Expert Comment

by:ChrisH
ID: 1466822
Unless you add the file at the right time, it doesn't matter where the file is put.  First try just self-registering the dll with regsvr32.  If the program works after that, then your problem is in the setup wizard registering the program.  If not, then it's a problem in the dll or the way your calling it in your project.  Such problems can arise because running an exe and just running your project can sometimes produce two different results due to the fact that the VB compiler and the debugger run things differently IE the parrellel processing.  Anyways, if the file runs after self-registering it, you need to add the dll AT THE END of the setup wizard.. it's the last screen before the program starts building.  Anywhere else, and the dll will not self-register.  The setup wizard is very crued and stupid to say the least.  It's not a good tool for creating installs to distribute to other users.  You really need to use a 3rd party installation program such as install shield.
0
 
LVL 1

Expert Comment

by:ChrisH
ID: 1466823
Did any of this work for you?
0
 

Author Comment

by:mguedes
ID: 1466824
thank´s ChrisH, i will try that....tomorow(because in my country , it's 10PM), and i comment to you......tomorow :c)
0
 
LVL 4

Accepted Solution

by:
chabaud earned 20 total points
ID: 1466825
Are you sure your Fortran DLL does not depend itself of other DLL. If it is a 32 bits DLL, your can check its dependencies using DEPENDS.EXE (a tool I have found into the win 98 CD).

If it is a 16 bits DLL, u can use EXESCAN.EXE (a shareware).
0
 

Author Comment

by:mguedes
ID: 1466826
Thank´s for your help............i´m remenber that i have a prog. installed that add a tab in the dlls properties with the dependence of the dll analized.!!! ;c)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

743 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

13 Experts available now in Live!

Get 1:1 Help Now