private static bool Is32BitProcessOn64BitProcessor()
{
bool result = false;
if (IntPtr.Size == 4)
{
IsWow64ProcessDelegate functionDelegate = GetIsWow64ProcessDelegate();
bool isWow64;
if (functionDelegate != null && functionDelegate.Invoke(Process.GetCurrentProcess().Handle, out isWow64))
{
result = isWow64;
}
}
return result;
}