@rtype: str @return: The number of bits in which this process believes to be running. For example, if running a 32 bit binary in a 64 bit machine, the number of bits returned by this method will be C{32}, but the value of L{System.arch} will be C
(self)
| 746 | raise NotImplementedError() |
| 747 | |
| 748 | def get_bits(self): |
| 749 | """ |
| 750 | @rtype: str |
| 751 | @return: The number of bits in which this process believes to be |
| 752 | running. For example, if running a 32 bit binary in a 64 bit |
| 753 | machine, the number of bits returned by this method will be C{32}, |
| 754 | but the value of L{System.arch} will be C{64}. |
| 755 | """ |
| 756 | |
| 757 | # Are we in a 32 bit machine? |
| 758 | if win32.bits == 32 and not win32.wow64: |
| 759 | # All processes are 32 bits. |
| 760 | return 32 |
| 761 | |
| 762 | # Is the process inside WOW64? |
| 763 | if self.is_wow64(): |
| 764 | # The process is 32 bits. |
| 765 | return 32 |
| 766 | |
| 767 | # The process is 64 bits. |
| 768 | return 64 |
| 769 | |
| 770 | # TODO: get_os, to test compatibility run |
| 771 | # See: http://msdn.microsoft.com/en-us/library/windows/desktop/ms683224(v=vs.85).aspx |
no test coverage detected