Solved

Win 7 64 Bit Application Error

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now