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:
This is an extension method allowing you to call it like this:
Have fun :mofo:
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;
}
}
Code:
IProcess process = ...;
var full_strings = process.MemFullStrings("substring");