Welcome Guest.   Make a donation to an author on the site September 21, 2014, 05:08:26 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2010! Download 24 custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Visual Basic: finding out dependent OCX/DLL files  (Read 6288 times)
lanux128
Global Moderator
*****
Posts: 6,089



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: November 24, 2008, 10:08:39 PM »

this is a topic in view of the ongoing NANY 2009. anyone programming in Visual Basic need to include all DLL/OCX files manualy if they're not using the PDW (package deployment wizard), so i prepared a simple guide to ensure that all the necessary files are distributed together.

Fig. 1


Fig. 2


Fig. 3
Logged

mouser
First Author
Administrator
*****
Posts: 33,370



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: November 25, 2008, 05:57:53 AM »

nice work lanux  thumbs up
Logged
CWuestefeld
Supporting Member
**
Posts: 933



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: November 25, 2008, 12:23:14 PM »

I was always running into problems with missing DLLs. Here's one of the ways I'd diagnose the problem -- and you could do the same to get the list of what you need.

There's a program called Depends that spits out tree showing all of the (linked) dependencies of a module. One weakness is that it only knows about dependencies that the linker knew about -- stuff that's dynamically loaded by your app code won't be caught.
Logged



PPLandry
Supporting Member
**
Posts: 691


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: November 25, 2008, 03:49:17 PM »

Another interesting way to get away of the DLL issues on your VB6 apps is to open it in VB.Net. You then get a list of references. If you then select each of these references, you can, in the properties pane, set that you want to use a local copy. Compiling your app will generate a manifest file (even if the compile fails, which it will inevitably)

With this manifest file you can set up a totally portable app in XP and Vista. No installation and no DLL hell.

More details can be provided if desired
« Last Edit: November 25, 2008, 05:13:07 PM by PPLandry » Logged

Real generosity toward the future lies in giving all to the present -- Albert Camus -- www.InfoQube.biz
wizard43
Participant
*
Posts: 2

View Profile Give some DonationCredits to this forum member
« Reply #4 on: December 02, 2008, 10:22:41 AM »

Although I haven't tried it, I understand the instructions for building a manifest file for a VB6 program, but I am completely lost as to how to use the manifest to create a portable, ie. no installation, exe.  This is something I have often wanted to do, and I have at least one client who still insists on doing everything in VB6. Sad
Logged
PPLandry
Supporting Member
**
Posts: 691


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: December 02, 2008, 02:29:42 PM »

But this is a pure VB6 solution. You use VB.net, to help you create the manifest file, nothing else. You could create the manifest file yourself by hand, but it is a lot of work...

Once you have your manifest file, copy all referenced DLL / OCX, the .exe and the manifest file to a folder. The .exe will run!

You can manually edit the manifest file to change paths of the DLLs/OCXs. You can check out the portable version of InfoQube for an example of this. http://www.sqlnotes.net
Logged

Real generosity toward the future lies in giving all to the present -- Albert Camus -- www.InfoQube.biz
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.033s | Server load: 0.24 ]