Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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));
            }
        }
}
Posted
Updated 7-Mar-16 22:48pm

1 solution

How about looking here?

UnicodeConverter[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900