示例#1
0
    bool TryGetMemoryReader(out ProcessMemoryReader reader)
    {
        int processId = SearchDosBoxProcess();

        if (processId != -1)
        {
            reader             = new ProcessMemoryReader(processId);
            reader.BaseAddress = reader.SearchFor16MRegion();
            if (reader.BaseAddress != -1)
            {
                return(true);
            }

            reader.Close();
        }

        reader = null;
        return(false);
    }