private static bool Is32BitProcessOn64BitProcessor() { IsWow64ProcessDelegate fnDelegate = GetIsWow64ProcessDelegate(); if (fnDelegate == null) { return(false); } bool isWow64; try { bool retVal = fnDelegate.Invoke(Process.GetCurrentProcess().Handle, out isWow64); if (retVal == false) { return(false); } } catch (Exception) { return(false); } return(isWow64); }
private static bool Is32BitProcessOn64BitProcessor() { IsWow64ProcessDelegate fnDelegate = GetIsWow64ProcessDelegate(); if (fnDelegate == null) { return(false); } bool isWow64; bool retVal = fnDelegate.Invoke(Process.GetCurrentProcess().Handle, out isWow64); return(retVal && isWow64); }
/// <summary> /// Gets a value indicating whether the current process is running as 32-bit on a 64-bit processor. /// </summary> /// <returns>True if the current processor is 64-bit.</returns> 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); }
private static bool Is32BitProcessOn64BitProcessor() { IsWow64ProcessDelegate fnDelegate = GetIsWow64ProcessDelegate(); if (fnDelegate == null) { return(false); } bool isWow64; bool retVal = fnDelegate.Invoke(System.Diagnostics.Process.GetCurrentProcess().Handle, out isWow64); if (retVal == false) { return(false); } return(isWow64); }
private static bool Is32BitProcessOn64BitProcessor() { IsWow64ProcessDelegate fnDelegate = GetIsWow64ProcessDelegate(); if (fnDelegate == null) { return(false); } bool isWow64; bool retVal = fnDelegate.Invoke(AppInfo.CurrentProcess.Handle, out isWow64); if (retVal == false) { return(false); } return(isWow64); }