Reputation: 147
Yesterday this exception started to occurr and I have no idea why it is happening. If I change p[0]
to p[1]
it stops the error, but it doesn't get client.dll. Screenshot of error.
Process[] p = Process.GetProcessesByName(Offsets.pro);
if (p.Length > 0)
{
foreach (ProcessModule m in p[0].Modules)
{
if (m.ModuleName == "client.dll")
{
Offsets.bClient = (int)m.BaseAddress;
return true;
}
}
return true;
}
else
{
return false;
}
}
catch (Exception e)
{
MessageBox.Show("Erro: " + e);
return false;
}
}
Upvotes: 1
Views: 204