File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ def test_mapped_filename(self, proc32_64):
474474 with proc32_64 .allocated_memory (0x1000 ) as addr :
475475 assert proc32_64 .get_mapped_filename (addr ) is None
476476
477- def test_current_thread_teb ():
477+ def test_current_thread_teb (self ):
478478 teb = windows .current_thread .teb
479479 assert ctypes .addressof (teb ) == ctypes .addressof (windows .current_thread .teb .NtTib .Self [0 ])
480480 assert ctypes .addressof (windows .current_process .peb ) == ctypes .addressof (teb .ProcessEnvironmentBlock [0 ])
Original file line number Diff line number Diff line change @@ -916,8 +916,10 @@ def teb_syswow_base(self):
916916
917917 @property
918918 def teb_syswow (self ):
919- return RemoteTEB64 (self .teb_syswow_base , self .owner )
920-
919+ if windows .current_process .bitness == 64 :
920+ return RemoteTEB64 (self .teb_syswow_base , self )
921+ else : #current is 32bits
922+ return RemoteTEB64 (self .teb_syswow_base , windows .syswow64 .ReadSyswow64Process (self .owner ))
921923
922924 def exit (self , code = 0 ):
923925 """Exit the thread"""
You can’t perform that action at this time.
0 commit comments