如何在.net中检测Windows操作系统版本?
我可以使用什么代码?
在C#中,如何以编程方式了解操作系统是x64还是x86
我在互联网上找到了这种API方法,但它不起作用
[DllImport("kernel32.dll")]
public static extern bool IsWow64Process(System.IntPtr hProcess, out bool lpSystemInfo);
public static bool IsWow64Process1
{
get
{
bool retVal = false;
IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, out retVal);
return retVal;
}
}
Run Code Online (Sandbox Code Playgroud)
提前致谢.