English 中文(简体)
What is preventing my .NET 2.0 application from running on a 64-bit platform?
原标题:

I have a .NET 2.0 application that won t run on a 64-bit OS (the customer tried both Server 2003 and Windows 7). The error message is:

The application failed to initialize properly (0xc0000135).

Googling this message returns little helpful information (one link I found just said if you get this message it s because they don t support 64-bit).

I d like to enable 64-bit support in my app. I don t have a 64-bit system to test with, and I don t want to make that investment without having some idea of what it will take to make this work.

Does anyone know what this error code really means? Are there any common pitfalls in 64-bit support that I should look out for?

The only hunch I have is the .NET TAPI wrapper (a now obsolete product called TransPort) might not work on a 64-bit system. (The vendor is long gone, and I have no source code).

最佳回答

The most likely cause of this problem is that your code is using a 32 bit specific native DLL either via COM interop, a mixed mode assembly (C++/CLI for example) or via PInvoke. Try setting your .Net application to be x86 architecture specific and see if it runs.

You can use the corflags tool to force the application to have 32 bit affinity

问题回答

If, as JaredPar suggested, you are using Interop, Microsoft s FxCop will find any issues relating to 32/64 calls on the standard system DLLs (System32.dll and User32.dll)





相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签