topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday October 11, 2024, 4:07 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Visual Basic: finding out dependent OCX/DLL files  (Read 14492 times)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Visual Basic: finding out dependent OCX/DLL files
« on: November 24, 2008, 10:08 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
sc_2008-11-23_001_ver001.png

Fig. 2
sc_2008-11-23_002_ver001.png

Fig. 3
sc_2008-11-23_003_ver001.png

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #1 on: November 25, 2008, 05:57 AM »
nice work lanux  :up:

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,009
    • View Profile
    • Donate to Member
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #2 on: November 25, 2008, 12:23 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.

PPLandry

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 702
    • View Profile
    • InfoQube Information manager
    • Read more about this member.
    • Donate to Member
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #3 on: November 25, 2008, 03:49 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
Real generosity toward the future lies in giving all to the present -- Albert Camus -- www.InfoQube.biz
« Last Edit: November 25, 2008, 05:13 PM by PPLandry »

wizard43

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #4 on: December 02, 2008, 10:22 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. :(

PPLandry

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 702
    • View Profile
    • InfoQube Information manager
    • Read more about this member.
    • Donate to Member
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #5 on: December 02, 2008, 02:29 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
Real generosity toward the future lies in giving all to the present -- Albert Camus -- www.InfoQube.biz