| View previous topic :: View next topic |
| Author |
Message |
Wiw3K Grandmaster Cheater
Reputation: 0
Joined: 09 Jul 2006 Posts: 762 Location: Poland.
|
Posted: Tue Feb 10, 2009 2:45 pm Post subject: [C#] ReadProcessMemory /unsafe problem...[SOLVED] |
|
|
error CS0227: Unsafe code may only appear if compiling with /unsafe
[DllImport("kernel32.dll", SetLastError = true)]
static unsafe extern bool ReadProcessMemory(
IntPtr hProcess,
IntPtr lpBaseAddress,
void* lpBuffer,
int dwSize,
out IntPtr lpNumberOfBytesRead
);
Last edited by Wiw3K on Tue Feb 10, 2009 3:29 pm; edited 3 times in total |
|
| Back to top |
|
 |
Zerith Master Cheater
Reputation: 1
Joined: 07 Oct 2007 Posts: 468
|
Posted: Tue Feb 10, 2009 3:13 pm Post subject: |
|
|
IT TELLS YOU EXACLY WHAT IT IS!!!
You don't have Form1_Load method in your code...
|
|
| Back to top |
|
 |
Wiw3K Grandmaster Cheater
Reputation: 0
Joined: 09 Jul 2006 Posts: 762 Location: Poland.
|
Posted: Tue Feb 10, 2009 3:16 pm Post subject: |
|
|
@up
OMGGG i am blind xD
thank you
check #1 ReadProcessMemory error
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Feb 10, 2009 3:23 pm Post subject: |
|
|
| Wiw3K wrote: | @up
OMGGG i am blind xD
thank you
check #1 ReadProcessMemory error  |
compile with unsafe LIKE IT SAYS TO DO, or just use IntPtr as lpBuffer's type (which is what you should do)
|
|
| Back to top |
|
 |
Wiw3K Grandmaster Cheater
Reputation: 0
Joined: 09 Jul 2006 Posts: 762 Location: Poland.
|
Posted: Tue Feb 10, 2009 3:28 pm Post subject: |
|
|
| slovach wrote: | | Wiw3K wrote: | @up
OMGGG i am blind xD
thank you
check #1 ReadProcessMemory error  |
compile with unsafe LIKE IT SAYS TO DO, or just use IntPtr as lpBuffer's type (which is what you should do) |
i changed void* to IntPtr and deleted unsafe.
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
ty for help
|
|
| Back to top |
|
 |
|