473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

WriteMemory / Read Memory / WriteProcessMemory in CSharp?

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 VC++ 6.0
(MFC) ReadMemory and WriteMemory, and WriteProcessMemory functions. As well
as it would be interesting how to get informations about the userspace of a
single process in dotNET (C#).

I already found out some specific things as Process-Object, where i can find
out the Virtual Memory used by the Program.

I would be glad about any information you can give me, because as you may
see, i "just" started developing in the new framework, and i am a bit
confused about the documentation system.

Thank you, STiAT aka Grabler Georg
Nov 15 '05 #1
2 9254
The marshal class lets you manipulate memory (read, write, etc.)

Jerry

"STiAT" <st***@chello.at> wrote in message
news:CH*******************@news.chello.at...
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 VC++ 6.0
(MFC) ReadMemory and WriteMemory, and WriteProcessMemory functions. As well as it would be interesting how to get informations about the userspace of a single process in dotNET (C#).

I already found out some specific things as Process-Object, where i can find out the Virtual Memory used by the Program.

I would be glad about any information you can give me, because as you may
see, i "just" started developing in the new framework, and i am a bit
confused about the documentation system.

Thank you, STiAT aka Grabler Georg

Nov 15 '05 #2
Thank you for your Reply, Jerry.

I found the Marshal class, and read over it quickly. The ReadByte would
fit great, but i have an other problem:

The Userspace i want to write to is of a different Process. So i dont
manipulate data from my own userspace, i want to manipulate a different
Process.

// Getting all Solitare Processes.
Process[] pArray = Process.GetProcessesByName("sol.exe");

Expect i want to read and write of and to the userspace of the pArray[0]
Process. The adress in the userspace is a certain hex-value i want to
read / write to.

Has anyone an idea how to manage that?

TIA,
Grabler Georg aka STiAT
Jerry Ham wrote:
The marshal class lets you manipulate memory (read, write, etc.)

Jerry

"STiAT" <st***@chello.at> wrote in message
news:CH*******************@news.chello.at...
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 VC++ 6.0
(MFC) ReadMemory and WriteMemory, and WriteProcessMemory functions. As


well
as it would be interesting how to get informations about the userspace of


a
single process in dotNET (C#).

I already found out some specific things as Process-Object, where i can


find
out the Virtual Memory used by the Program.

I would be glad about any information you can give me, because as you may
see, i "just" started developing in the new framework, and i am a bit
confused about the documentation system.

Thank you, STiAT aka Grabler Georg



Nov 15 '05 #3

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

Similar topics

3
by: hunterb | last post by:
I have a file which has no BOM and contains mostly single byte chars. There are numerous double byte chars (Japanese) which appear throughout. I need to take the resulting Unicode and store it in a...
3
by: Bill Cohagan | last post by:
I'm writing a console app in c# and am encountering a strange problem. I'm trying to use redirection of the standard input stream to read input from a (xml) file. The following code snippet is from...
9
by: james | last post by:
I have a FileStream retrieved from FileOpenDialog. I have a Byte which I intend to store for later use. What is the most efficient way of getting the File into my Byte and tehn back out to a new...
2
by: Matthias S. | last post by:
I'm using C#Express Beta and the framework 2.0. I recently realized that my application, when starting has a workingset peak of ~128 MegaB. I startet wondering a bit because the application...
2
by: WJScott69 | last post by:
C# - CSharp - WIN32 - WMI Progamming Issues with NT4 (Out of Memory) Hello, I am trying to inquire on servers ranging from Windows NT4 SP6a+ to Windows 2000-2003 I have the program working...
10
by: Tibby | last post by:
I need to read/write not only text files, but binary as well. It seems like on binary files, it doesn't right the last 10% of the file. -- Thanks --- Outgoing mail is certified Virus...
2
by: =?Utf-8?B?SXJmYW4=?= | last post by:
Hello, It may be a repeated question but I don't find the solution to the situation that I encounter in it. My application is monitoring another application that is built in VB6. The...
11
by: michelqa | last post by:
Hello, I can retrieve column text from a ListView in another process but I cant figure out how to access to structure elements (LVCOLUMN) <code> //Handle variable is a valid ListView handle ...
0
by: jimmy.dansbo | last post by:
Hi, I am trying to use iscsidsc.dll in a csharp program, but have a lot of trouble with it. One thing I have working is GetIScsiInitiatorNodeName in the following way: public static extern...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.