1

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;
        }
    }
jakdep
  • 852
  • 1
  • 11
  • 28
xyaz
  • 139
  • 8
  • Its good to put the error message in the question text, even if you already have it in the title. – Sam Axe Apr 06 '17 at 23:48
  • According to [Microsoft](https://msdn.microsoft.com/en-us/library/windows/desktop/aa378137(v=vs.85).aspx), 0x80004005 is an E_FAIL (Unspecified failure). Good luck. – Sam Axe Apr 06 '17 at 23:50
  • what do i do then? any tips? – xyaz Apr 06 '17 at 23:51
  • 1
    possibly http://stackoverflow.com/a/9502058/74015 – Sam Axe Apr 06 '17 at 23:56
  • the thing is is didnt changed anything i got it that i cant access mainmodule 0 but how did i was doing it before and now i cant i dont understand. – xyaz Apr 07 '17 at 00:08
  • ok i got it resolved /close please – xyaz Apr 07 '17 at 00:34
  • 1
    Hi Franz. What was the solution? You can post the answer to your own question if you figured it out. It might be helpful to anyone running into the same issue in the future. – jakdep Apr 07 '17 at 00:39

1 Answers1

1

I resolved it restarting my pc apparently the vs was bugged XD.

xyaz
  • 139
  • 8