# SystemStats::is64Bit

**URL:** https://forum.juce.com/t/systemstats-is64bit/2172
**Category:** General JUCE discussion
**Created:** [October 13, 2007, 12:22am UTC](https://forum.juce.com/t/systemstats-is64bit/2172 "2007-10-13T00:22:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![matt](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/matt/32/18340_2.png) [@matt](https://forum.juce.com/u/matt)
#### Post date: [October 13, 2007, 12:22am UTC](https://forum.juce.com/t/systemstats-is64bit/2172/1 "2007-10-13T00:22:42Z")

</div>

SystemStats::is64Bit would be handy. It’s useful if you’re doing things like running 32-bit code on a 64-bit OS.

Here’s a Windows version:

[code]#ifdef \_WIN64

bool SystemStats::is64Bit()  
{  
return true;  
}

#else

typedef BOOL (WINAPI \*LPFN\_ISWOW64PROCESS) (HANDLE, PBOOL);

bool SystemStats::is64Bit()  
{  
LPFN\_ISWOW64PROCESS  
fnIsWow64Process = (LPFN\_ISWOW64PROCESS)GetProcAddress(GetModuleHandle(“kernel32”),“IsWow64Process”);

BOOL bIsWow64 = FALSE;

```
if (NULL != fnIsWow64Process)
{
fnIsWow64Process(GetCurrentProcess(),&bIsWow64);
}

return FALSE != bIsWow64; // convert from BOOL to bool

```

}

#endif

[/code]

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)
#### Post date: [October 13, 2007, 8:13pm UTC](https://forum.juce.com/t/systemstats-is64bit/2172/2 "2007-10-13T20:13:04Z")

</div>

Ok, thanks Matt, I’ll maybe pop that in there.

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)
#### Post date: [May 12, 2017, 10:06am UTC](https://forum.juce.com/t/systemstats-is64bit/2172/3 "2017-05-12T10:06:47Z")

</div>


