Results 1 to 2 of 2

Thread: Installing dll files and making them accessible to several programs

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2019
    Posts
    108

    Installing dll files and making them accessible to several programs

    Building on a theme that I touched upon in

    https://www.vbforums.com/showthread....91#post5507691

    The full scope of my situation is as follows.

    In the VB6 platform I created a group of executable files that used the same library files. I only had to install one of these files for the l library dlls’ to be installed, and then all the rest of the programs would work without requiring a separate install.

    I am in the process of converting these programs to VB.NET. When these programs are installed their library files get installed in a place unique to each program, with no opportunity for them to be shared.
    The option that I wish to explore to address this situation is to install the library files in the GAC.

    This link:

    http://www.developerin.net/a/68-Asse...emblies-in-GAC

    Indicates that I only need to drag the dlls’ into the folder (C:\Windows\assembly) and they will be available to all the programs. I am accustomed to using the regsvr32 utility to perform a similar operation in Windows 7 systems, but there seem to be no mention of this as a necessity. Also, when I examine the contents of the C:\Windows\assembly folder, I see that the dlls’ are in distinct folders some with accompanying .ini files. This makes me think that the solution is more than just dragging and dropping dll files.

    I would appreciate comments on this method.

    By examining 3 locations I can identify the necessary dll files. These locations are:

    • projects \obj\Debug folder
    • projects publish tab under the Application Files.
    • folder of the installed program

    in the folder of the installed program for each dll file there also exists a manifest file and -ms file. This makes me doubt that simply placing the dll file in the GAC folder will not resolve my problem.

    Bottom Line, is there a way to install files such as

    AxInterop.WMPLib.dll
    BouncyCastle.Crypto.dll
    Interop.WMPLib.dll
    itextsharp.dll

    In a location that would make them accessible by several programs.

    Thanks

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,543

    Re: Installing dll files and making them accessible to several programs

    Unless they are YOUR libraries, I would NOT install them to the GAC. Why? Because it may cause other apps to use them in error when they should be using others from another location. If the developers of those libraries intended for them to be loaded into the GAC, then that's were they would have been installed in the first place. Thing is, things started to be put into the GAC, the people complained that things weren't portable enough... IT also started to go back to the days of DLL hell with version differences. So now things aren't in the GAC by default.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width