|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
BadImageFormatException on framework 64 bitMy application uses a win32 DLL (unmanaged code) and it works well with .net
framework 32 bit. Now I'm testing it with .net framework 64 bit on a pc with windows XP 64 bit and as soon as the application start I get this error when the program load the win32 dll: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) I read win 32 applications work on windows XP 64 bit, so why this exception? Rudy wrote:
> My application uses a win32 DLL (unmanaged code) and it works well with .net Is your application a Dotnet2.0 application?> framework 32 bit. Now I'm testing it with .net framework 64 bit on a pc with > windows XP 64 bit and as soon as the application start I get this error when > the program load the win32 dll: System.BadImageFormatException: An attempt > was made to load a program with an incorrect format. (Exception from HRESULT: > 0x8007000B) > I read win 32 applications work on windows XP 64 bit, so why this exception? > Do you install the 64bit dotent2.0 framework in your 64 machine XP? If both yes, your application will run in native 64bit mode and it cannot load any 32 bit native dll (non-dotnet dll). You can check your application in the task manager in "Processes" tab in 64 OS. If it has no a mark "*32", it is running in 64 bit mode. If the application is developed yourself, you can set it in the development tools (e.g. VS2005) to mark it always running in 32 bit mode. Then, your application can use the 32 bit dll no problem. -- Jacky Kwok jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk jacky@compose_DOT_com_DOT_hk > You can check your application in the task manager in "Processes" tab in Yes you are right, it is running in 64 bit mode.> 64 OS. If it has no a mark "*32", it is running in 64 bit mode. > If the application is developed yourself, you can set it in the > development tools (e.g. VS2005) to mark it always running in 32 bit > mode. Then, your application can use the 32 bit dll no problem. But if I set it to run in 32 bit mode then all managed and unmanaged code run in 32 bit mode? In other words can I take advantage from 64 bit system or not? Thanks!!! Rudy wrote:
>> You can check your application in the task manager in "Processes" tab in In my opinion, it is dependent on your actual case.>> 64 OS. If it has no a mark "*32", it is running in 64 bit mode. >> If the application is developed yourself, you can set it in the >> development tools (e.g. VS2005) to mark it always running in 32 bit >> mode. Then, your application can use the 32 bit dll no problem. > > Yes you are right, it is running in 64 bit mode. > But if I set it to run in 32 bit mode then all managed and unmanaged code > run in 32 bit mode? In other words can I take advantage from 64 bit system or > not? > Thanks!!! If your 64bit OS just run only one application and the application is 32bit application, it will not take advantage from 64 bit system. However, in most case, there are many applications running in one computer. Hence, overall the system still can take some advantage, e.g. the system can use more physical memory (if the computer have so much memory). Of cause, the best solution is to convert the 32 bit DLL to 64 bit DLL. -- Jacky Kwok jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk jacky@compose_DOT_com_DOT_hk
When do you call DataGrid.DataBind()
How to intercept IP packet from an application ??? fuslogvw question DataGrid/DataSet programmer help is needed Displaying video/images on 2nd monitor Static and non static functions Problem with Dictionary<T,U>.Keys enumerator returning invalid keys Issue with multiple GUI threads on .NET 1.1 System.DirectoryServices and WinNT provider what happen to microsoft.public.dotnet.framework.interop |
|||||||||||||||||||||||