Like Tree1Likes
  • 1 Post By brewbuck

Determine dependant dlls

This is a discussion on Determine dependant dlls within the Tech Board forums, part of the Community Boards category; I have a CVI executable that calls functions from a Visual Studio prj that produces a UserDriver.dll. I had a ...

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Determine dependant dlls

    I have a CVI executable that calls functions from a Visual Studio prj that produces a UserDriver.dll.
    I had a problem whereby i copied the UserDriver prj and modified it to generate a UserDriverEngRel.dll. I had not modified the .def file and so the .exe was in fact calling UserDriver.dll functions instead of UserDriverEngRel.dll functions.

    From the CVI .exe i wish to determine which dlls are used by the .exe and display the build date & time and version issue on the UI so the user can verify that these are correct.
    How do i do this?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,494
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    2
    Thanks for the pointer to the utility which looks really useful, i will try it out in anger tomorrow at work. When i put the post on i was ideally looking for some sort of C function that would perhaps return an array of strings listing the dependant dlls?
    Is this possible? or is there a windows type function that would do this?

  4. #4
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    The depends.exe utility works by walking the import tables recursively, starting with the program executable. There is no built-in Windows function that accomplishes that.

    Even so, that's not the whole story because DLLs can get loaded by a call to LoadLibrary() at runtime. A program might depend on foo.dll even if foo.dll is not imported. The problem has no generic solution.
    stahta01 likes this.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inter-dependant classes
    By Colin_theRobot in forum C++ Programming
    Replies: 8
    Last Post: 04-03-2006, 12:08 PM
  2. Use of DLLs
    By Supar in forum C++ Programming
    Replies: 7
    Last Post: 06-17-2003, 03:25 PM
  3. question from linux board ( not os dependant )
    By crypto in forum C Programming
    Replies: 4
    Last Post: 11-15-2002, 01:09 AM
  4. What does implementation-dependant mean?
    By Gamma in forum C++ Programming
    Replies: 1
    Last Post: 04-19-2002, 06:56 PM
  5. How CProgramming dependant are you :)?
    By Carlos in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 09-17-2001, 09:16 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21