|
-
Jul 11th, 2007, 01:29 PM
#1
Thread Starter
Addicted Member
[RESOLVED] [2.0] Question about ReadProcessMemory
This is my declaration:
[DllImport("kernel32.dll")]
public static extern int ReadProcessMemory(IntPtr hProcess, Int32 lpBaseAddress, [In, Out] byte[] buffer, Int32 nSize, [In, Out] Int32 lpNumberOfbytesWritten);
//
int BytesWritten = 0;
byte[] data = new byte[260];
ReadProcessMemory(lpProcess, iFile, data, 260, BytesWritten);
MessageBox.Show("Bytes: " + BytesWritten + "\nData: " + data);
This is what I tested:
1. lpProcess is valid handle
2. iFile is the address and also valid
The thing is that data (the buffer), must return a string... and the messagebox returns this:
Bytes: 0
Data: System.Byte[]
any ideas???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|