本文整理汇总了C#中System.Diagnostics.ProcessModule类的典型用法代码示例。如果您正苦于以下问题:C# ProcessModule类的具体用法?C# ProcessModule怎么用?C# ProcessModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProcessModule类属于System.Diagnostics命名空间,在下文中一共展示了ProcessModule类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScanOffsets
public static void ScanOffsets(MemUtils memUtils,ProcessModule client,ProcessModule engine)
{
clientDll = client;
engineDll = engine;
clientDllBase = clientDll.BaseAddress.ToInt32();
engineDllBase = engineDll.BaseAddress.ToInt32();
EntityOff(memUtils);
LocalPlayer(memUtils);
Jump(memUtils);
GameResources(memUtils);
ClientState(memUtils);
SetViewAngles(memUtils);
SignOnState(memUtils);
GlowManager(memUtils);
WeaponTable(memUtils);
EntityID(memUtils);
EntityHealth(memUtils);
EntityVecOrigin(memUtils);
PlayerTeamNum(memUtils);
PlayerBoneMatrix(memUtils);
PlayerWeaponHandle(memUtils);
vMatrix(memUtils);
clientDll = null;
engineDll = null;
clientDllBase = 0;
engineDllBase = 0;
}
示例2: ModuleDataObject
public ModuleDataObject(Process p, ProcessModule m, bool isDisabled)
: base(string.Format("{0}.{1}", p.Id, m.FileName))
{
ID = p.Id;
Refresh(p, m, isDisabled);
ConstructionIsFinished = true;
}
示例3: CacheInfo
public CacheInfo(ProcessModule module)
{
FileDescription = module.FileVersionInfo.FileDescription;
FileVersion = module.FileVersionInfo.FileVersion;
ProductName = module.FileVersionInfo.ProductName;
ProductVersion = module.FileVersionInfo.ProductVersion;
}
示例4: HEAP_INFO
public HEAP_INFO(ulong heapAddress, ulong heapLength, string heapProtection, string extra, ProcessModule associatedModule)
{
this.heapAddress = heapAddress;
this.heapLength = heapLength;
this.heapProtection = heapProtection;
this.extra = extra;
this.associatedModule = associatedModule;
}
示例5: RemoteModule
/// <summary>
/// Initializes a new instance of the <see cref="RemoteModule" /> class.
/// </summary>
/// <param name="memorySharp">The reference of the <see cref="MemorySharp" /> object.</param>
/// <param name="module">The native <see cref="ProcessModule" /> object corresponding to this module.</param>
internal RemoteModule(MemoryBase memorySharp, ProcessModule module) : base(memorySharp, module.BaseAddress)
{
// Save the parameter
Native = module;
LazyData =
new Lazy<byte[]>(
() => MemoryCore.ReadBytes(memorySharp.Handle, module.BaseAddress, module.ModuleMemorySize));
}
示例6: Update
public virtual void Update(IntPtr value, ProcessModule targetModule)
{
IntPtr baseAddress = targetModule.BaseAddress;
FileVersionInfo info = targetModule.FileVersionInfo;
int offset = value.GetInt32OffsetFrom(targetModule.BaseAddress);
Build = info.FileVersion;
Value = offset;
}
示例7: FindPattern
public uint FindPattern( ProcessModule pModule, string szPattern, string szMask, char Delimiter ) {
string[] saPattern = szPattern.Split( Delimiter );
byte[] bPattern = new byte[ saPattern.Length ];
for( int i = 0; i < bPattern.Length; i++ )
bPattern[ i ] = Convert.ToByte( saPattern[ i ], 0x10 );
return FindPattern( pModule, bPattern, szMask );
}
示例8: Memory
public Memory(ProcessModule engineDll, ProcessModule clientDll)
{
Scanner.ScanOffsets(clientDll, engineDll, Program.MemUtils);
ClientDllBase = (int) clientDll.BaseAddress;
var engineDllBase = (int) engineDll.BaseAddress;
_entityList = ClientDllBase + Offsets.Misc.EntityList;
_viewMatrix = ClientDllBase + Offsets.Misc.ViewMatrix;
ClientState = Program.MemUtils.Read<int>((IntPtr) (engineDllBase + Offsets.ClientState.Base));
ActiveWeapon = "Default";
}
示例9: doWork
public static void doWork(object crap)
{
try
{
Process process = Process.GetCurrentProcess();
ProcessModule[] modules = new ProcessModule[process.Modules.Count];
process.Modules.CopyTo(modules, 0);
var niQuery =
from m in modules
where m.FileName.Contains(@"\" + process.ProcessName + ".ni")
select m.FileName;
bool ni = niQuery.Count() > 0 ? true : false;
if (!ni)
{
// FORNOW: for PoC debugging and sanity checking
Console.WriteLine("The app is not NGen'd.");
Console.WriteLine("NGen'ing the app...");
var assemblyPath = process.MainModule.FileName;
ProcessStartInfo startInfo = new ProcessStartInfo();
// TODO: Determine the path to (the appropriate version of)
// ngen.exe.
// FORNOW: Just use a hardcoded path to ngen.exe for PoC.
startInfo.FileName =
@"C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe";
startInfo.Arguments = "install \"" + assemblyPath + "\"";
// TBD: process options that you think make sense
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
try
{
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
}
}
catch
{
// TBD: error handling that you think makes sense - e.g.
// logging or displaying the error, moving on regardless
// etcetera.
}
}
}
catch
{
}
}
示例10: Get
public static CacheInfo Get(string key, ProcessModule module)
{
CacheInfo result;
if( CachedInfos.TryGetValue(key, out result))
{
return result;
}
result = new CacheInfo(module);
CachedInfos[key] = result;
return result;
}
示例11: Framework
public Framework(ProcessModule clientDll, ProcessModule engineDll)
{
CSGOScanner.ScanOffsets(WithOverlay.MemUtils, clientDll, engineDll);
clientDllBase = (int)clientDll.BaseAddress;
engineDllBase = (int)engineDll.BaseAddress;
dwEntityList = clientDllBase + CSGOOffsets.Misc.EntityList;
dwViewMatrix = clientDllBase + CSGOOffsets.Misc.ViewMatrix;
dwClientState = WithOverlay.MemUtils.Read<int>((IntPtr)(engineDllBase + CSGOOffsets.ClientState.Base));
mouseEnabled = true;
AimbotActive = false;
}
示例12: IsNetModule
static bool IsNetModule(ProcessModule m)
{
var s = m.ModuleName;
if (s.Equals("mscorwks.dll", StringComparison.OrdinalIgnoreCase))
return true;
if (s.Equals("mscorsvr.dll", StringComparison.OrdinalIgnoreCase))
return true;
if (s.Equals("clr.dll", StringComparison.OrdinalIgnoreCase))
return true;
return false;
}
示例13: BackgroundProcess
public void BackgroundProcess()
{
do
{
Thread.Sleep(500);
ffximain = (from ProcessModule m in pol.Modules where m.ModuleName.ToLower() == "ffximain.dll" select m).FirstOrDefault();
}
while (ffximain == null);
_FFACE = new FFACE(pol.Id);
while (_FFACE.Player.Name == "")
Thread.Sleep(500);
_FFACE.Windower.SendString("/vanatunes hold on");
sCharName = _FFACE.Player.Name;
profile = "(none)";
//TODO: Check player name and set default profile
byte[] mobPtrTmp = new byte[4];
IntPtr mobPtrArraySize = new IntPtr();
ReadProcessMemory(pol.Handle, new IntPtr(ffximain.BaseAddress.ToInt32() + 0x8020c), mobPtrTmp, 4, ref mobPtrArraySize);
IntPtr mobPtr = new IntPtr(BitConverter.ToInt32(mobPtrTmp, 0));
ReadProcessMemory(pol.Handle, mobPtr, mobFlags, 4096*4, ref mobPtrArraySize);
m_Zone = _FFACE.Player.Zone;
uVanaHour = _FFACE.Timer.GetVanaTime().Hour;
m_Status = _FFACE.Player.Status;
m_Buffs = _FFACE.Player.StatusEffects;
if (_FFACE.Party.Party0Count == 1 && _FFACE.Party.Party1Count == 0 && _FFACE.Party.Party2Count == 0)
bPartyMember = false;
else
bPartyMember = true;
bFighting = false;
bInBattlefield = false;
do{
if (CheckConditions())
{
UInt16 thisTrack = ExecScript();
if (thisTrack != currentTrack)
{
currentTrack = thisTrack;
_FFACE.Windower.SendString("/vanatunes playOverride " + currentTrack);
}
}
Thread.Sleep(500);
} while(Program.runCharThreads);
if(ffximain != null)
_FFACE.Windower.SendString("/vanatunes hold off");
}
示例14: ModuleObject
public ModuleObject(Process p, ProcessModule m, string username)
{
Objects[(int)ModuleItemTypes.Name] = Path.GetFileName(m.FileName);
Objects[(int)ModuleItemTypes.ID] = p.Id;
Objects[(int)ModuleItemTypes.Path] = Path.GetDirectoryName(m.FileName);
Objects[(int)ModuleItemTypes.ModuleMemorySize] = m.ModuleMemorySize; //
Objects[(int)ModuleItemTypes.FileDescription] = m.FileVersionInfo.FileDescription;
Objects[(int)ModuleItemTypes.FileVersion] = m.FileVersionInfo.FileVersion;
Objects[(int)ModuleItemTypes.Product] = m.FileVersionInfo.ProductName;
Objects[(int)ModuleItemTypes.ProductVersion] = m.FileVersionInfo.ProductVersion;
ForegroundColor = ProcessObject.GetColorFromName(p, username);
ToolTipText = m.FileVersionInfo.FileDescription;
}
示例15: TryGetCachedValue
public virtual bool TryGetCachedValue(ProcessModule targetModule, out IntPtr result)
{
result = IntPtr.Zero;
IntPtr baseAddress = targetModule.BaseAddress;
FileVersionInfo info = targetModule.FileVersionInfo;
if (IsSameVersion(info))
{
result = baseAddress + Value;
return true;
}
return false;
}