Results 1 to 3 of 3

Thread: [RESOLVED] How Do I Determine if DLL is even needed?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    220

    Resolved [RESOLVED] How Do I Determine if DLL is even needed?

    There is a 3rd party DLL that I noticed was being installed from an old InnoSetup script I wrote mega years ago.

    In my current state of re-education into all things VB6 to deal with my old apps, I'm left to wonder "do I really need to install all these DLL's and OCX's?"

    I've learned a lot in the last 24 hours. The answer was 'no' for many of them as they are part of modern Win OS's.

    But what about some of my 3rd party DLL's?

    It has been my understanding that I only needed to do a text search of my code for every DECLARE statement and see if any DLL lib function was being used.

    With one of my DLL's, msfl651d.dll, it has been a part of several of my apps that did any work on Metastock data. MSFL651D.DLL is put out by Equis International for their Metastock platform.

    In one particular VB6 app, it definitely loads Metastock data and loads it into a SQLITE database (oh its been so long when I was trying to learn SQLITE with Olaf's help in the old days). However, not only does this DLL not show up in the VBP file (when opened in notepad), but no DECLARE statement pops up in text search with "msfl651d" anywhere in the search.

    Does this mean that I've been installing a DLL unnecessarily for this app, or my approach to determine if needed is insufficient?

    Thanks.

    ADDED: I do notice that there are OBJECTS created within my application in which no DECLARE is in code. For instance, the app uses vbRichClient5.dll. For this DLL, I can see it is listed in my REFERENCES. So I am assuming then that if in REFERENCES you don't need to DECLARE its lib functions? At least in the case of my app, I see code like "Public Cnn As cConnection" and I could not determine where this "cConnection" was being defined as a CLASS. Turns out that when I removed the 'reference' of vbRichClient5.dll, my compiler balked at the "Public Cnn As cConnection" as undefined. Alas! I now know that cConnection is part of vbRichClient5.dll. Was there an easier way to determine this other than removing DLL's from within References?
    Last edited by webbiz; Sep 26th, 2021 at 01:24 PM.

  2. #2
    Hyperactive Member
    Join Date
    Jun 2015
    Posts
    508

    Re: How Do I Determine if DLL is even needed?

    Simple answer - Open up the app, try to access all forms at least once run listdlls on it and see what been loaded.

    https://docs.microsoft.com/en-us/sys...loads/listdlls

    ActiveX dlls wont show up in declares, if you open the vbp file in notepad you will see the clsid and ocx/dll name for
    components/references, but each dll may import more dependencies of their own. you could also attach a debugger
    to the process like ollydbg and have it break on dll load and go about using the program for a while and watch
    what gets loaded.

    dependencies of dependencies is where it can get tricky if its 3rd party stuff.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    220

    Re: How Do I Determine if DLL is even needed?

    Quote Originally Posted by dz32 View Post
    Simple answer - Open up the app, try to access all forms at least once run listdlls on it and see what been loaded.

    https://docs.microsoft.com/en-us/sys...loads/listdlls

    ActiveX dlls wont show up in declares, if you open the vbp file in notepad you will see the clsid and ocx/dll name for
    components/references, but each dll may import more dependencies of their own. you could also attach a debugger
    to the process like ollydbg and have it break on dll load and go about using the program for a while and watch
    what gets loaded.

    dependencies of dependencies is where it can get tricky if its 3rd party stuff.
    Thanks. :-)

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