Solved

Win 7 64 Bit Application Error

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

765 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