Skip to content

Instantly share code, notes, and snippets.

@0xF6
Last active November 9, 2015 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xF6/70a3f31fd73e78b94f3e to your computer and use it in GitHub Desktop.
Save 0xF6/70a3f31fd73e78b94f3e to your computer and use it in GitHub Desktop.
public static boolean is64bitProcess()
{
String wow64_kernel = System.getenv("systemroot") + "\\SysWOW64\\kernel32.dll";
if (new File(wow64_kernel).exists())
{
try
{
System.load(wow64_kernel);
}
catch (UnsatisfiedLinkError e)
{
return true;
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment