Jump to content

Photo

Getting a System.ApplicationException


  • Please log in to reply
1 reply to this topic

#1 XenZibe Posted 18 May 2016 - 07:01 PM

XenZibe

    Soldier

  • Members
  • Pip
  • 1 posts

Hi all, I'm trying to read some memory from one of the games. I've managed to figure out the static address and the offsets required using cheat engine. Was hoping MemorySharp could assist me with creating an app to automatically read said address. You can find my code below:
 
Please understand that I'm not really wanting to release the name of the product that I'm attempting to modify :) I have replaced the name with *****. The name is working and I've verified that the game variable is correct
 
 

            Console.WriteLine("going to find the game now"); - Works
            Process game = Process.GetProcessesByName("*********").FirstOrDefault(); // Get our game - Works
            Console.WriteLine("Variable Game is showing: " + game.ProcessName.ToString()); // Write the game to output - works
            var m = new MemorySharp(game); // MS - fails here
            Console.WriteLine("Variable M is showing: ", m.ToString()); // check if MS has found something - Doesn't run

 

My errors are below.

 

 

going to find the game now
Variable Game is showing: ********
Exception thrown: 'System.ApplicationException' in MemorySharp.dll
'Software Inc Editor.vshost.exe' (CLR v4.0.30319: Software Inc Editor.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[8184] Software Inc Editor.vshost.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.
 
I'm pretty new to this and currently have no idea if I've done all this completely wrong.

  • Back to top
  • Report

#2 tungusa Posted 23 September 2016 - 02:14 AM

tungusa

    Soldier

  • Members
  • Pip
  • 2 posts

Try:

 

using System.Diagnostics;

.

.

.

var m = new MemorySharp(Process.GetProcessesByName("*********")[0]);

 


  • Back to top
  • Report




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users