如何在任何进程中读取tcvn3字符? [英] How to read tcvn3 character in any process?
问题描述
亲爱的所有人
有人可以告诉我如何通过C#编程语言阅读过程中的TCVN3字符(我控制)。
我只看到C#支持ASCII和Unicode ?是不是?
我使用下面的代码并收到相同的字符
- 使用ASCII收到:Tr?i Cung,T?
- 使用收到的Unicode:T#?i Cu#g,T?#
问题是如何读取完整字符TCVN3正在进行中!
非常感谢您的帮助< br $> b $ b
我尝试过:
我的代码阅读记忆流程:使用ReadProcessMemory(API)
Dear all
Can some one tell me how to read TCVN3 character in process (I control) by C# programming language.
I See C# only Support ASCII and Unicode? is it right?
I Had use below code and received Character same here
- Use ASCII received: Tr?i Cung, T?
- Use Unicode received: T#?i Cu#g, T?#
The problem is how to Read Full Character TCVN3 in process!
Thanks a lots for help
What I have tried:
My Code Read memeory Process: use ReadProcessMemory (API)
public class clsMemoryEditor
{
[DllImport("Kernel32.dll")]
static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, UInt32 nSize, ref UInt32 lpNumberOfBytesRead);
IntPtr hand;
public clsMemoryEditor(IntPtr handle)
{
hand = handle;
}
public byte[] Read(int Address, int length)
{
byte[] ret = new byte[length];
uint o = 0;
ReadProcessMemory(hand, (IntPtr)Address, ret, (UInt32)ret.Length, ref o);
return ret;
}
public int ReadInt32(int Address)
{
return BitConverter.ToInt32(Read(Address, 4), 0);
}
public string ReadString(int Address, int length, bool isUnicode)
{
if (isUnicode)
{
UnicodeEncoding enc = new UnicodeEncoding();
return enc.GetString(Read(Address, length));
}
else
{
ASCIIEncoding enc = new ASCIIEncoding();
return enc.GetString(Read(Address, length));
}
}
}
推荐答案
看这儿怎么样?
UnicodeConverter [ ^ ]
How about looking here?
UnicodeConverter[^]
这篇关于如何在任何进程中读取tcvn3字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!