`// My Func
private byte[] InjectAndExecute(...)
{
try
{
...
while (BitMemory.ReadInt(adressCodeToExecute) > 0)
Thread.Sleep(1);
...
}
catch { }
}
// In DLL the final function where the error occurs
public static int ReadInt32(IntPtr hProcess, uint dwAddress, bool bReverse)
{
byte[] array = ReadBytes(hProcess, dwAddress, 4);
if (array == null)
throw new Exception("ReadInt failed.");
if (bReverse)
Array.Reverse(array);
return BitConverter.ToInt32(array, 0);
}`
BitMemory is a DLL library in C#, I can’t modify it.
After I use the ReadInt method, I get a “System.Exception” in BitMemory.dll . The exception occurs because I’m clearing the memory address in a parallel thread, but that shouldn’t be a problem because I’m using TRY-CATCH. What can be done to prevent this from turning into a comedy?
New contributor
Jitropolit is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.