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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:05:52+00:00 2026-05-14T07:05:52+00:00

I have a 32-bit .net application that uses a native 32-bit DLL via DllImport().

  • 0

I have a 32-bit .net application that uses a native 32-bit DLL
via DllImport(). The native DLL is our internal file analysis library, and I need to use it as porting it to C# would be a problem if people update it (other software uses it).

The problem is that when I try to execute any method in the native DLL I get a System.ExecutionEngineException thrown. In fact, I’ve reduced the managed application to a simple tester that just calls a native method, but it still fails.

I am on 64-bit Windows 7, but that should not matter as I’m compiling everything as 32-bit binaries.

What is also interesting, when I look at the native DLL in the Dependency Walker, it shows that it can’t find msvcr90.dll – but when I open any other of our native DLLs in the Dependency Walker, it can find their referenced msvcr90.dll just fine. Can there by some wrongness in the compilation of native DLL that messes up its DLL references?

  • 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-14T07:05:52+00:00Added an answer on May 14, 2026 at 7:05 am

    OK – the problem was a little bit misty. Apparently a colleague modified the native DLL’s method to contain one parameter with default value (that C++ handles just fine), but, as we know, C# 3.5 does not. After supplying a value for that parameter, everything worked fine!

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

Sidebar

Related Questions

I have an ASP.NET application that P/Invokes a 32-bit DLL. When i deployed it
I have a .NET application that uses some API calls, for example GetPrivateProfileString .
We have an ASP.NET application that uses the Infragistics WebSchedule control to display appointments
I have a simple ASP.NET MVC web application that uses NHibernate with FluentNHibernate's auto
I have a .NET application that was supposed to be compiled as a 32-bit
I have a .net application that is doing COM interop and calling some native
I have a C# WPF (.NET 4.0) application that uses Excel interop to read
I'm working on an ASP.NET web application that uses a lot of JavaScript on
I have a C++ application that uses the Win32 API for Windows, and I'm
Here's the core problem: I have a .NET application that is using COM interop

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.