473,462 Members | 1,243 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Read others Process Memory?

Hello everyone.

A not too long time ago, i wrote a Post about "Reading process memory".

Now, i got a good answer, about using the "marshal" class.

I read over the class quickly, but i could not find a solution to write
anothers process memory.

As it was done in C++ (WinAPI)
IntPtr hProcess

where i can pass by a processes adress.

Now, i read the Process-List with
Process[] pArray = Process.GetProcessesByName("Tibia");
in C#

As i found in the marshal class, the function ReadByte in the Marshal
class would fit fine. But how to read of the process memory of the other
Process? I cant find anything where ic an pass by a Process-Object or
Object-Reference.

Thank you,
Grabler Georg

PS: Sorry that i dont use a "real" E-Mail this time, last time i got
spammed by hundreds of e-mails an hour with several viruses and other
things.
The ones who want to write an E-Mail, please to
georg at grabler.net

Nov 15 '05 #1
4 8057
Now, i got a good answer, about using the "marshal" class.


I don't think it'll help you here. The Marshal class only works with
addresses in your own process space.

I think you have to use the ReadProcessMemory Win32 API, since there's
no corresponding functionality in the BCL.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 15 '05 #2

"GRABLER Georg" <ma**@not.set> wrote in message
news:ua**************@TK2MSFTNGP12.phx.gbl...
Hello everyone.

A not too long time ago, i wrote a Post about "Reading process memory".

Now, i got a good answer, about using the "marshal" class.

I read over the class quickly, but i could not find a solution to write
anothers process memory.

As it was done in C++ (WinAPI)
IntPtr hProcess

where i can pass by a processes adress.

Now, i read the Process-List with
Process[] pArray = Process.GetProcessesByName("Tibia");
in C#

As i found in the marshal class, the function ReadByte in the Marshal
class would fit fine. But how to read of the process memory of the other
Process? I cant find anything where ic an pass by a Process-Object or
Object-Reference.

Thank you,
Grabler Georg

PS: Sorry that i dont use a "real" E-Mail this time, last time i got
spammed by hundreds of e-mails an hour with several viruses and other
things.
The ones who want to write an E-Mail, please to
georg at grabler.net


Not quite clear why you need to read another process memory, anyway you need
to call the Win32 API "ReadProcessMemory" using PInvoke.

Willy.
Nov 15 '05 #3
Willy Denoyette [MVP] wrote:
"GRABLER Georg" <ma**@not.set> wrote in message
news:ua**************@TK2MSFTNGP12.phx.gbl...
Hello everyone.

A not too long time ago, i wrote a Post about "Reading process memory".

Now, i got a good answer, about using the "marshal" class.

I read over the class quickly, but i could not find a solution to write
anothers process memory.

As it was done in C++ (WinAPI)
IntPtr hProcess

where i can pass by a processes adress.

Now, i read the Process-List with
Process[] pArray = Process.GetProcessesByName("Tibia");
in C#

As i found in the marshal class, the function ReadByte in the Marshal
class would fit fine. But how to read of the process memory of the other
Process? I cant find anything where ic an pass by a Process-Object or
Object-Reference.

Thank you,
Grabler Georg

PS: Sorry that i dont use a "real" E-Mail this time, last time i got
spammed by hundreds of e-mails an hour with several viruses and other
things.
The ones who want to write an E-Mail, please to
georg at grabler.net

Not quite clear why you need to read another process memory, anyway you need
to call the Win32 API "ReadProcessMemory" using PInvoke.

Willy.


Thank you for your repiles.

Reading and Writing other process memory is sometimes necessary for
preventing gameservers opening direct3d windows where you can set the
options. with writing in the others userspace i can tell, that i have
set the options and finished with using the default values.

Thank you for your replies, it makes me stop .NET development again.

Grabler Georg

Nov 15 '05 #4
I thought that writing into another's process space was a privilege required
by debuggers only ;-).
What's your problem using PInvoke, and there is Managed C++ (which is also
part of .NET.), just curious how did you manage this before .NET?

Willy.

"GRABLER Georg" <ma**@not.set> wrote in message
news:uK**************@TK2MSFTNGP09.phx.gbl...
Willy Denoyette [MVP] wrote:
"GRABLER Georg" <ma**@not.set> wrote in message
news:ua**************@TK2MSFTNGP12.phx.gbl...
Hello everyone.

A not too long time ago, i wrote a Post about "Reading process memory".

Now, i got a good answer, about using the "marshal" class.

I read over the class quickly, but i could not find a solution to write
anothers process memory.

As it was done in C++ (WinAPI)
IntPtr hProcess

where i can pass by a processes adress.

Now, i read the Process-List with
Process[] pArray = Process.GetProcessesByName("Tibia");
in C#

As i found in the marshal class, the function ReadByte in the Marshal
class would fit fine. But how to read of the process memory of the other
Process? I cant find anything where ic an pass by a Process-Object or
Object-Reference.

Thank you,
Grabler Georg

PS: Sorry that i dont use a "real" E-Mail this time, last time i got
spammed by hundreds of e-mails an hour with several viruses and other
things.
The ones who want to write an E-Mail, please to
georg at grabler.net

Not quite clear why you need to read another process memory, anyway you need to call the Win32 API "ReadProcessMemory" using PInvoke.

Willy.


Thank you for your repiles.

Reading and Writing other process memory is sometimes necessary for
preventing gameservers opening direct3d windows where you can set the
options. with writing in the others userspace i can tell, that i have
set the options and finished with using the default values.

Thank you for your replies, it makes me stop .NET development again.

Grabler Georg

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Sebastian Krause | last post by:
Hello, I tried to read in some large ascii files (200MB-2GB) in Python using scipy.io.read_array, but it did not work as I expected. The whole idea was to find a fast Python routine to read in...
5
by: jdh2358 | last post by:
I have a python file that is trying to read raw data from a raw partition on a dying dist, eg f = file('/dev/sda') f.seek(SOMEWHERE) s = f.read(SOMEBYTES) On some blocks, the read succeeds,...
8
by: Pham Nguyen | last post by:
I haven't used the READ UNCOMMITTED transaction isolation level before, and I was wondering if this would be an appropriate use: I have an ID table containing ID numbers that are randomly...
2
by: STiAT | last post by:
Hello. I tried to find a similar Function to WriteMemory, and couldnt find any memory manipulating functions in dotNET at all. I now wanted to know if there are any similar functions to the...
5
by: Roman Mashak | last post by:
Hello, All! I already posted my question and received valuable feedbacks, I changed my code as was proposed here but still receive the same error of valgrind. SO, the code is: #define...
2
by: Emmanuel | last post by:
Hi there, My client would like to process an xml file. the structure of which is as below. <xml> <stockitem> <releaseddate>.....date value...</releaseddate> <...aditional tags for additional...
3
by: XJ | last post by:
Hi experts, i try to use vb.net 2005 call dll, then give me "Attempted to read or write protected memory.This is often an indication that other memory is corrupt". i have chk some message others...
12
by: Sean Davis | last post by:
I am working on a simple script to read from one database (oracle) and write to another (postgresql). I retrieve the data from oracle in chunks and drop the data to postgresql continuously. The...
113
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.