Click here to Skip to main content
15,915,164 members
Home / Discussions / C#
   

C#

 
GeneralRe: webservice return Pin
Nick Parker6-Jul-07 8:46
protectorNick Parker6-Jul-07 8:46 
GeneralRe: webservice return Pin
brsecu7-Jul-07 2:25
brsecu7-Jul-07 2:25 
GeneralRe: webservice return Pin
Nick Parker7-Jul-07 4:48
protectorNick Parker7-Jul-07 4:48 
GeneralRe: webservice return Pin
brsecu7-Jul-07 5:50
brsecu7-Jul-07 5:50 
Question[2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 4:00
games guru6-Jul-07 4:00 
AnswerRe: [2.0] a few read/writeprocessmemory questions Pin
Christian Graus6-Jul-07 4:08
protectorChristian Graus6-Jul-07 4:08 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 4:17
games guru6-Jul-07 4:17 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Luc Pattyn6-Jul-07 4:32
sitebuilderLuc Pattyn6-Jul-07 4:32 
Hi,

1.
I am unfamiliar with ProcessMemoryReaderLib; if it only offers Read methods
that return byte[] then it is up to you to convert some bytes into other types
such as int. There are basically two ways to do this:
- algorithmically, writing some code that performs the necessary calculations
- thru a memory-based union (one of the tricks from good old Fortran days):
create a struct that contains both data types, and give it marshaling attributes
that make the members occupy the same memory addresses (FieldOffset).

The former requires you take care of big-endian/little-endian considerations,
the latter will apply your machine's endianness (LE for x86).

BTW if you want an array in your union, you must "flatten" it, by applying
additional attributes as in:
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] myArray;
otherwise the struct simply stores the array reference.

2.
You can convert an IntPtr to an int using one of its methods; then add to it,
and cast it back to an IntPtr.

3.
if by changing a hex dump you mean changing the memory content, it seems you
need some code to modify the byte[] you read, and then pass it back to the
appropriate Write method. Your target process may suffer !

Smile | :)




GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 4:44
games guru6-Jul-07 4:44 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Luc Pattyn6-Jul-07 5:05
sitebuilderLuc Pattyn6-Jul-07 5:05 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 5:28
games guru6-Jul-07 5:28 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 6:04
games guru6-Jul-07 6:04 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Jimmanuel6-Jul-07 6:27
Jimmanuel6-Jul-07 6:27 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 6:38
games guru6-Jul-07 6:38 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Jimmanuel6-Jul-07 7:04
Jimmanuel6-Jul-07 7:04 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 7:28
games guru6-Jul-07 7:28 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Jimmanuel6-Jul-07 7:47
Jimmanuel6-Jul-07 7:47 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 7:50
games guru6-Jul-07 7:50 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Jimmanuel6-Jul-07 8:10
Jimmanuel6-Jul-07 8:10 
GeneralRe: [2.0] a few read/writeprocessmemory questions [modified] Pin
games guru6-Jul-07 8:30
games guru6-Jul-07 8:30 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Jimmanuel6-Jul-07 8:40
Jimmanuel6-Jul-07 8:40 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 9:04
games guru6-Jul-07 9:04 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Jimmanuel6-Jul-07 9:35
Jimmanuel6-Jul-07 9:35 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 9:43
games guru6-Jul-07 9:43 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
PhilDanger6-Jul-07 11:23
PhilDanger6-Jul-07 11:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.