Results 1 to 2 of 2

Thread: Path of DLL

  1. #1
    Join Date
    Aug 2011
    Location
    Germany
    Posts
    27
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Path of DLL

    I have created a DLL which is loaded by an application out of a framework. How can I check in which path my dll is running? When I have a full application, I could use

    Qt Code:
    1. QApplication a(argc, argv);
    2. QString appPath = a.applicationDirPath();
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Path of DLL

    If I understand correctly, you want to know the exact file that your operating system has dynamically loaded when your application started? You can check outside of the application using depends.exe on Windows and ldd on UNIX (ensuring the environment is correctly set up). There's no (neat) way to do this at run time that I am aware of: especially on Windows where DLL loading can be subverted badly by manifests, side-by-side assemblies etc.

    What problem are you trying to solve?

Similar Threads

  1. Path for a dll , is it possible ?
    By tonnot in forum Newbie
    Replies: 3
    Last Post: 9th December 2010, 16:07
  2. How do we set our PATH?
    By ardisaz in forum Qt for Embedded and Mobile
    Replies: 7
    Last Post: 28th November 2010, 18:27
  3. Replies: 8
    Last Post: 17th October 2009, 08:10
  4. Lib path
    By yagabey in forum Qt Programming
    Replies: 4
    Last Post: 3rd April 2009, 15:01
  5. Which path should I use?
    By Dark_Tower in forum Newbie
    Replies: 3
    Last Post: 8th April 2006, 12:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.