Solved

Win 7 64 Bit Application Error

Posted on 2013-01-08
3
282 Views
Last Modified: 2013-01-22
Experts,

I`m using C# .NET 3.5 Visual Studio 2008.

I`m in the process of porting over my development to a 64 bit OS from a 32 bit OS. I`m getting an error which says "BadImageFormat Exception was unhandled : is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)"

I tried changing the target to X64 and I still get the same errro.

Also, I`m using DirectX libraries. Do you think I`m getting the error because these libraries could be 32 bit?

Any help would be greatly appreciated.

San
0
Comment
Question by:San24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 38755520
32 bit applications/DLLs have no problem running in 64 bit systems as long as everything runs as 32 bit. Have you tried compiling your exe as 32bit only? I suspect your exe is 64bit and there is some DLL it is using which is 32bit.
0
 

Author Comment

by:San24
ID: 38755629
Initially everything was set to be 32 Bit. The only dll that is not a 32 bit a hardware based protection key.

So now, I disabled the 64 bit dll and I get a new error

DLL 'C:\SP212\CP2012\CP2012\bin\x86\Debug\Microsoft.DirectX.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38755642
Never seen that error but this relates to it

http://msdn.microsoft.com/en-us/library/ms173266%28VS.80%29.aspx
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question