Solved

Win 7 64 Bit Application Error

Posted on 2013-01-08
3
277 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 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