R
Rob
If I have an SV that contains a real (valid) memory address I can read
bytes from that memory address using:
unpack("I", unpack("P4", pack("L", $address)));
Is there a similar perl mechanism that would allow me to write bytes
back at that memory address?
Background:
Using Win32::GUI a number of callback functions for windows GUI events
pass the a win32api lParam value to the callback. For some events the
lParam value is a pointer to windows memory, and for some of those
events it is necessary to change parts of the structure pointed to in
order to get specific behaviour.
I am currently using Win32::API and the win32api RtlMoveMemory function
to achieve what I need, but I would like to remove the Win32::API
dependency.
Perhaps the best solution is to deal with this XS-side in the Win32::GUI
source?
TIA for any pointers or advice,
Rob.
bytes from that memory address using:
unpack("I", unpack("P4", pack("L", $address)));
Is there a similar perl mechanism that would allow me to write bytes
back at that memory address?
Background:
Using Win32::GUI a number of callback functions for windows GUI events
pass the a win32api lParam value to the callback. For some events the
lParam value is a pointer to windows memory, and for some of those
events it is necessary to change parts of the structure pointed to in
order to get specific behaviour.
I am currently using Win32::API and the win32api RtlMoveMemory function
to achieve what I need, but I would like to remove the Win32::API
dependency.
Perhaps the best solution is to deal with this XS-side in the Win32::GUI
source?
TIA for any pointers or advice,
Rob.