Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6151823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:49:24+00:00 2026-05-23T19:49:24+00:00

We create a DLL for other applications to load and use some of the

  • 0

We create a DLL for other applications to load and use some of the functionality in the application. The DLL has dependency on the the actual path where it is loaded from.

  <product_home>/bin/<DLL is here>
              |
              |----/configdir/configfile
              |----/lib/<java jarfiles>

It needs the product_home location to read config files and load jar files etc

My windows application proloads a special DLL. I need to find actual path to a loaded DLL with in the process and use it to set a “HOME” variable. This will be used in rest of the processing. Using an externally set environment variable some time fails when there are multiple versions of dll present on the machine. To me it looks like DLL can figure out its own “product_home” as long it can get the actual loaded location.

The DLL This article Get Your DLL’s Path/Name provides one such way- (yet to try it successfully. The generated exe crashes). Is this the correct approach?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:49:24+00:00Added an answer on May 23, 2026 at 7:49 pm

    Either I don’t understand your need, or the link you mention is not what you need. If I understand you correctly, you’d like to get the full path of a certain DLL loaded by the process. So, say that DLL is “kernel32.dll”, you’d like to get “c:\windows\system32\kernel32.dll”. Please correct me if I’m wrong.

    If that’s what you want, the easiest way to do that would be:

    HMODULE hModule = GetModuleHandle(_T("kernel32.dll"));
    TCHAR dllPath[_MAX_PATH];
    GetModuleFileName(hModule, dllPath, _MAX_PATH);
    

    Failures checks omitted for brevity – read more about GetModuleHandle and GetModuleFileName.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Unmanaged Exports to create a native .dll from .NET .dll so I
My Visual Studio solution has several late-bound projects (dll) which are loaded by other
I have an Asp.net application which require a third-part .dll from other department(In fact,it
I am trying to create DLL out of my C# code, I found some
I have to create a DLL which is used by a VB6 application. This
I have to create a wrapper DLL that exports some symbols (functions). Within its
I am trying to create a .NET DLL so I can use the cryptographic
I have some plugins as dll files. My application loads the dll and it
I've created a .DLL in WPF. To use it in existing Windows Forms application
I am trying to create a WCF web service which will allow other applications

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.