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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:20:10+00:00 2026-05-25T22:20:10+00:00

I have a C# library DLL which is loaded from an unmanaged process. So

  • 0

I have a C# library DLL which is loaded from an unmanaged process. So far everything is good. Now I wanted to incorporate the Enterprise Library 5.0 with its logging capabilities. I added these references:

  • Microsoft.Practices.EnterpriseLibrary.Common.dll
  • Microsoft.Practices.Unity.dll
  • Microsoft.Practices.Unity.Interception.dll
  • Microsoft.Practices.ServiceLocation.dll
  • Microsoft.Practices.EnterpriseLibrary.Logging.dll

…and all the using statements required.
Here is an excerpt from the class:

using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.InterceptionExtension;
using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Unity.Configuration;    

[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Unicode,Pack=2)]
unsafe public static class DLLDispatch
{
    private static IConfigurationSourceBuilder LoggingBuilder = new ConfigurationSourceBuilder();
    ...
}

The problem is that when this field is defined the unmanaged processes crashes. If it is commented out, this crash does not happen. And here is the windows application log for this crash:

**Sig[0].Name=Application Name

Sig[0].Value=terminal64.exe

Sig[1].Name=Application Version

Sig[1].Value=5.0.0.507

Sig[2].Name=Application Timestamp

Sig[2].Value=003f5e00

Sig[3].Name=Fault Module Name

Sig[3].Value=clr.dll

Sig[4].Name=Fault Module Version

Sig[4].Value=4.0.30319.237

Sig[5].Name=Fault Module Timestamp

Sig[5].Value=4dd2333e

Sig[6].Name=Exception Code

Sig[6].Value=c00000fd

Sig[7].Name=Exception Offset

Sig[7].Value=000000000007382a**

I searched the web for the exception code c00000fd and found it to be a stackoverflow 🙂 exception.
I played around a bit and this crash occures everytime there is an instance involved from the enterprise library. If nothing is used of that library then there is no crash. What is going on here? Is it becasue the class is in unsafe context or what else can it be?
Thanks in advance.

  • 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-25T22:20:10+00:00Added an answer on May 25, 2026 at 10:20 pm

    I found the solution to this problem. One has to put a app-config file in the unmanaged application folder with this content:

    <?xml version="1.0" encoding="UTF-8" ?>
    <configuration>
     <runtime>
       <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <probing privatePath="Unmanaged application startup folder" />
       </assemblyBinding>
     </runtime>
    </configuration>
    

    With this information the CLR can bind assemblies and searches in the correct folder. It was not clear to me that a config file is also useful for unmanaged applications.

    Thanks, Juergen

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

Sidebar

Related Questions

Consider i have an assembly(class library dll) which i have loaded using the following
Let's say I have written a Class Library (dll) in .Net and now I
I have a code which is compiled into a library (dll, static library and
Consider we have a dynamic library ( HelloWorld.dll ) which is compiled with Microsoft
I have a DLL file library.dll which contains a function foo . The function
I have implemented software which have a DLL library which contains a set of
Let's say I have a library Lib.dll, which uses Castle.Windsor to initialize its services.
I have a .net library dll that acts like a functional library. There are
I have a DLL library, but I am not familiar with it. How can
I have written a C# class library (DLL) and wondering the quickest way to

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.