To date, I have only run my .NET app on X86 boxes. I would like to run it on Win2008 X64 but am concerned about my use of pinvoke to make kernel32.dll calls.
Here are the kernel32.dll calls that I currently use in my app:
[DllImport("kernel32.dll")]
static extern void OutputDebugString(string lpOutputString); //used for handling internal exceptions
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr GetModuleHandle(string moduleName);
DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
[PreserveSig]
private static extern int GetModuleFileName([In] IntPtr hModule, [Out] StringBuilder lpFilename, [In][MarshalAs(UnmanagedType.U4)] int nSize);
[DllImport("kernel32.dll")]
private static extern int GetCurrentThreadId();
[DllImport("kernel32.dll")]
private static extern int GetCurrentProcessId();
Will these same calls still work on an X64 OS (my App is compiled as AnyCPU)? Do i need to use different kernel calls when running in 64 bit mode?
thanks
View Complete Post