MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / MakePtr32

Function MakePtr32

windows/remotectypes.py:477–490  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

475
476# ctypes 64 -> 32 methods
477def MakePtr32(type):
478 class PointerToStruct32(Remote_c_void_p32):
479 _sub_ctypes_ = (type)
480
481 # Not sur about this code..
482 # Logic problem: why do I have PointerToStruct32 and RemoteStructurePointer32... ?
483 @property
484 def contents(self):
485 return RemoteStructurePointer32.from_buffer_with_target_and_ptr_type(bytearray(self), target=self.target, ptr_type=self).contents
486
487 def __repr__(self):
488 return "<RemotePtr32 to struct {0}>".format(type.__name__)
489
490 return PointerToStruct32
491
492def transform_structure_to_remote32bits(structcls):
493 """Create a remote structure for a 32bits target process"""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected