views:

97

answers:

3

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).

+8  A: 

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

JaredPar
Beat me by about a minute :)
Joel Coehoorn
It will be a little while before I can put this to the test, but it sure looks right. Thanks!
Jon B
+1  A: 

Some useful info for you here as well : Visual Studio .NET Platform Target Explained

Shoban
+1 - Excellent link! Thank you!
TrueWill
+1  A: 

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)

John Gietzen