Read string in other process

02/21/2017 13:29 Kickupx#1
Some games uses strings to store data about the game.
For this reason I often want to search for substring and then read in the whole string.

Using [Only registered and activated users can see links. Click Here To Register...] it is done like this:
Code:
public static class ProcessOps
{
    public static string[] MemFullStrings(this IProcess process, string substring)
    {
        var matches = process.MemFind(substring);
        var result = new string[matches.length];

        for(var i = 0; i < matches.length; ++i)
             result[i] = process.MemReadString(matches[i]);
        return result;
    }
}
This is an extension method allowing you to call it like this:

Code:
IProcess process = ...;
var full_strings = process.MemFullStrings("substring");
Have fun :mofo: