DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

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

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Visual Basic: finding out dependent OCX/DLL files
« on: November 25, 2008, 04:08 AM »
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,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #1 on: November 25, 2008, 11:57 AM »
nice work lanux  :up:

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,009
    • Participated in NANY Challenge Once
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #2 on: November 25, 2008, 06: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
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #3 on: November 25, 2008, 09: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, 11:13 PM by PPLandry »

wizard43

  • Participant
  • Joined in 2008
  • *
  • Posts: 2
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #4 on: December 02, 2008, 04:22 PM »
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
Re: Visual Basic: finding out dependent OCX/DLL files
« Reply #5 on: December 02, 2008, 08: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

Original address: https://www.donationcoder.com/forum/index.php?topic=15876.0