Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Win 7 64 Bit Application Error

Posted on 2013-01-08
3
Medium Priority
?
284 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 2000 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 is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

916 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