5

I've a dll which I've built in Windows7 (64bit OS) in 'Win32' platform. Unfortunately, when I import this dll in C# code, I encounter:

"

an attempt was made to load a program with an incorrect format HRESULT: 0x8007000B

" is observed

When I used DependencyWalker for this DLL, it shows IESHIMS.dll and MSVCR110.dll dependency which could not be found.

From where these dlls come from and why my created dll has dependency over these two? Pl help how can I getg over this?

Note: I've used x86 platform in my C# code.

stack_pointer is EXTINCT
  • 2,263
  • 12
  • 49
  • 59
  • There's a very strong hint that you've not actually managed to set the Platform Target correctly, 99.9% odds on a 64-bit operating system. Get a second opinion from the Corflags.exe utility, run it from the Visual Studio Command Prompt and pass the path to your EXE. The 32BIT option must be 1. – Hans Passant Sep 20 '12 at 17:16
  • I solved this 0x8007000B with an app runing in 32 bit by going in windows/syswov64 folder changing the MSVCR110.dll version 64 with the MSVCR110.dll 32 bit version. (Just don't forget to put back the 64 dll when you have run your app) – JinSnow Apr 01 '16 at 10:20

3 Answers3

3

IEShims.dll is available on Windows Vista or Windows 7 to handle protected-mode Internet Explorer 9 or newer. Further explanation here.

You should be able to obtain a copy from another Windows 7 machine with Internet Explorer 9 or newer. As a quick fix, get the Windows 7 version from http://www.dll-files.com/dllindex/dll-files.shtml?ieshims

Community
  • 1
  • 1
Hanxue
  • 12,243
  • 18
  • 88
  • 130
2

You probably don't have the C++ runtime installed. Download it and install it. You have to play with the versions of runtime a bit. There are quite a few versions available. This will take care of your MSVCR110.dll issue. I am not sure why the dll show dependency for an IE dll though.

rptony
  • 1,024
  • 1
  • 12
  • 22
1

Make sure you chose x86 for the target architecture in the properties of your C# project.

123
  • 5,666
  • 7
  • 25
  • 30