def is_64bit(self): """Determines if a process is 64bit. @return: True if 64bit, False if not """ if self.h_process == 0: self.open() with contextlib.suppress(Exception): val = c_int(0) ret = KERNEL32.IsWow64Process(self.h_process, byref(val)) if ret and not val.value and is_os_64bit(): return True return False
def is_64bit(self): """Determines if a process is 64bit. @return: True if 64bit, False if not """ if self.h_process == 0: self.open() try: val = c_int(0) ret = KERNEL32.IsWow64Process(self.h_process, byref(val)) if ret and not val.value and is_os_64bit(): return True except: pass return False