If I have a 32-bit application written in C#, what do I need to do to convert it 64-bit? I'm assuming its more complicated then simply changing the target machine to 64-bit in Visual Studio and recompiling.
It depends what your application is doing. If it uses unmanaged APIs, P/Invoke and pointer arithmetics, it is quite possible that it won't work on a 64-bit platform without some modifications. Otherwise you it be OK, you don't even need to specify a platform, just target for Any CPU and it should work.
If you don’t use interop (COM, WinAPI) and don’t make assumptions about the size of pointers it’s a straightforward switch to the other platform. Even when using the latter you are probably fine, unless you use libraries that somewhere make above mentioned assumptions.
To quote the MSDN concerning System.IntPtr:
The IntPtr type is designed to be an integer whose size is platform-specific. That is, an instance of this type is expected to be 32-bits on 32-bit hardware and operating systems, and 64-bits on 64-bit hardware and operating systems.
– But the other .NET types are designed to have a fixed size, regardless of the platform.
How about doing as this question suggests? I've never done this before, I'll note.
http://msdn.microsoft.com/en-us/library/ms241064.aspx
The other comments are good points. You also need to understand the changes with registry virtualization and the Wow64 node.
I'm assuming its more complicated then simply changing the target machine to 64-bit in Visual Studio and recompiling.
Maybe not. If you don't have any dependencies on outside libraries, that's all you have to do. What makes it more challenging beyond that is the deployment. You don't want to send a 64-bit binary to a 32-bit user. So, even better, choose the "Any CPU" option, and your app will automatically JIT compile as 64-bit on a 64-bit machine (with the 64-bit version of the framework installed) and 32-bit (x86) everywhere else.
But you have to be very sure you don't have any 32-bit dependencies.
Do you actually need it to be running in 64 bit or do you just want it to run on a 64 bit machine?
In the case of the latter you can set the C# project to target Win32, rather than AnyCPU. This means when you run it on a 64 bit machine it will run through WOW (32 bit "emulation") this has the advantage that the (unmanaged) JET driver will also run 32 bit. This should solve your problem.
On of my coworkers just ran into a problem with one of his personal projects. It turns out that Microsoft hasn't written Jet drivers for 64-bit and has no intention of doing so.
Which is odd, since Office 2010 will have a 64-bit version.
My advice to you is to set the projects properties to x86 (not Any CPU) and leave it there. Windows 64-bit can run 32-bit applications without problems, it's 16-bit applications they can't run.