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 6218897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:41:15+00:00 2026-05-24T07:41:15+00:00

I have run into this issue too many times and need this to be

  • 0

I have run into this issue too many times and need this to be an automated approach:

I have multiple DLL files that are constantly being built/changed that multiple projects use.

I have created a C# application that detects if the DLL files are present and warns the operator if they are not and kills the program. In this C# application, I want it to also check to determine if it is a “debug” version – in other words it would crash if it ran on an end users computer.

Now I have been searching high and low and found a few possible solutions, but they all fall through.

Assembly.LoadFrom(string) does not work for unmanaged code. I can use this to test against the managed DLL files but not the C++ ones.

I thought I might be able to use Dependency Walker or similar program to run within my application to give me the data of the assembly references, unfortunately, the depends.exe console only outputs to a file (and then I would have to read in each file and parse it for my data (very intensive plus I have to include the depends.exe and DLL files in my projects)), furthermore, it doesn’t seem to output the data I really want (or at least I wasn’t able to make it).

Also tried dumpbin, but I can’t seem to get it to run on my machine.

I also found some links that were supposed to give me the source for Dependency Walker. Unfortunately they all turned up dead. I wouldn’t think this is that hard of a thing to do, but for whatever reason I am having quite the difficulty figuring out how automate this.

Some source links that have been helpful to me, but none of them have solved the issue with unmanaged assembly data.

  • Listing Referenced Assemblies

  • How to automate integration testing? (Stack Overflow)

  • Determining if a .NET Assembly is compiled debug or not

  • How to tell if a .NET Assembly is debug or release

  • Programmatically detecting Release/Debug mode (.NET) (Stack Overflow)

  • How do I detect the DLLs required by an application? (Stack Overflow)

  • How to Programmatically Detect if an Assembly is Compiled in Debug or Release mode

  • 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-24T07:41:15+00:00Added an answer on May 24, 2026 at 7:41 am

    If you know the names of all the DLLs (because, for example, you ran Dependency Walker) you can just use LoadLibrary to check for unmanaged DLLs.

    [DllImport("kernel32.dll")]
    static extern IntPtr LoadLibrary(string dllToLoad);
    
    [DllImport("kernel32.dll")]
    static extern IntPtr LoadLibraryEx(string lpFileName, IntPtr hFile, uint dwFlags);
    const UInt32 DONT_RESOLVE_DLL_REFERENCES = 0x00000001;
    const UInt32 LOAD_LIBRARY_AS_DATAFILE = 0x00000002;
    const UInt32 LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008;
    
    [DllImport("kernel32.dll")]
    static extern bool FreeLibrary(IntPtr hModule);
    
    [DllImport("kernel32.dll")]
    static extern UInt32 GetLastError();
    
    void CheckUnmanagedDll(string DllName)
    {
        IntPtr hModule = LoadLibrary(DllName);
        if (hModule.Equals(IntPtr.Zero))
            MessageBox.Show("Can't find " + DllName);
         FreeLibrary(hModule);
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have run into this problem a few times and I'm not happy with
I've run into this issue in the past, and have been able to work
I run into this problem. I have a textarea which I only want to
I seem to run into this situation quite a lot and have yet to
NOTE: I have solved the majority of this problem but have run into a
Ok so this is a brand new snag I have run into. I am
I have run into a little problem. I am connecting to a webservice that
I have run into a situation where I want to ensure that a compound
I have a Comet application that may have many instances open at once. This
Hi I have run into an issue. I have implemented jquerys famous autocomplete and

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.