.Net中的内存值 [英] Memory values in .Net

查看:56
本文介绍了.Net中的内存值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我只是想知道是否有可能更改内存值是.Net应用程序?像VB,C#或Visual C ++ - 我几乎可以肯定你可以在本机应用程序,但它可能在.Net?!

如果有可能请发给我代码..
和BTW我也发现这个(Visual Basic):





















1 私人 声明 功能 OpenProcess Lib " kernel32" ByVal dwDesiredAccess As 整数 < font style ="font-size:11px">, ByVal bInheritHandle As 整数 ByVal dwProcessId As 整数 As 整数
2 私人 声明 功能 WriteProcessMemory Lib " kernel32" ; ByVal hProcess As 整数 ByVal lpBaseAddress As 整数 ByRef lpBuffer As 整数 ByVal nSize As 整数 ByRef lpNumberOfBytesWritten As 整数 As 整数
3 私人 声明 功能 ReadProcessMemory Lib " kernel32" Alias " ReadProcessMemory" ByVal hProcess As 整数 ByVal lpBaseAddress As Integer ByRef lpBuffer As 整数 ByVal nSize As < font style ="font-size:11px"> 整数 ByRef lpNumberOfBytesWritten As 整数 As Integer
4 私人 声明 功能 CloseHandle Lib " kernel32" ByVal hObject As 整数 < font style ="font-size:11px">) As 整数
5 Const PROCESS_ALL_ACCESS =& H1F0FFF

解决方案

嗨Lavi .A,

是的,这可以做到,但它并不完全一项微不足道的任务。以下是关于它的几个主题。

读取内存: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/80072c5a-52b1-4d07-b3b3-db6b25df24f8
写作记忆: http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/661fe4be-4e09-4bb4-a47b-389dc18ed83b 结果< br>

BTW,这个论坛是针对VS文档的问题和问题。考虑在其中一种语言论坛中发布未来的编程问题,例如 Visual Basic Visual C# 。谢谢!搜索结果的问候,


Hello, I just want to know is it possible to change a memory value is .Net application? like VB, C# or Visual C++ - I almost sure you can in native application but is it possible in .Net?!

If it's possible please send me the code..
And BTW I also found this (Visual Basic):

1 Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As IntegerByVal bInheritHandle As IntegerByVal dwProcessId As IntegerAs Integer 
2     Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As IntegerByVal lpBaseAddress As IntegerByRef lpBuffer As IntegerByVal nSize As IntegerByRef lpNumberOfBytesWritten As IntegerAs Integer 
3     Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntegerByVal lpBaseAddress As IntegerByRef lpBuffer As IntegerByVal nSize As IntegerByRef lpNumberOfBytesWritten As IntegerAs Integer 
4     Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As IntegerAs Integer 
5     Const PROCESS_ALL_ACCESS = &H1F0FFF 

解决方案

Hi Lavi .A,

Yes, this can be done, but it's not exactly a trivial task.  Here are a couple of threads about it.

Reading memory: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/80072c5a-52b1-4d07-b3b3-db6b25df24f8
Writing memory: http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/661fe4be-4e09-4bb4-a47b-389dc18ed83b

BTW, this forum is meant for VS documentation questions and issues. Consider posting future programming questions in one of the languages forums, such as Visual Basic or Visual C#.  Thanks!

Regards,


这篇关于.Net中的内存值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆