@rtype: str @return: The architecture in which this process believes to be running. For example, if running a 32 bit binary in a 64 bit machine, the architecture returned by this method will be L{win32.ARCH_I386}, but the value of L{System.arch}
(self)
| 722 | return wow64 |
| 723 | |
| 724 | def get_arch(self): |
| 725 | """ |
| 726 | @rtype: str |
| 727 | @return: The architecture in which this process believes to be running. |
| 728 | For example, if running a 32 bit binary in a 64 bit machine, the |
| 729 | architecture returned by this method will be L{win32.ARCH_I386}, |
| 730 | but the value of L{System.arch} will be L{win32.ARCH_AMD64}. |
| 731 | """ |
| 732 | |
| 733 | # Are we in a 32 bit machine? |
| 734 | if win32.bits == 32 and not win32.wow64: |
| 735 | return win32.arch |
| 736 | |
| 737 | # Is the process outside of WOW64? |
| 738 | if not self.is_wow64(): |
| 739 | return win32.arch |
| 740 | |
| 741 | # In WOW64, "amd64" becomes "i386". |
| 742 | if win32.arch == win32.ARCH_AMD64: |
| 743 | return win32.ARCH_I386 |
| 744 | |
| 745 | # We don't know the translation for other architectures. |
| 746 | raise NotImplementedError() |
| 747 | |
| 748 | def get_bits(self): |
| 749 | """ |
no test coverage detected