Open zengfr opened 4 years ago
i see in project code https://github.com/ZenLulz/MemorySharp/blob/deepening-project/src/MemorySharp/Modules/ModuleCore.cs
var module = Process.GetCurrentProcess().Modules.Cast().FirstOrDefault Process.Modules Process.MainModule if in 64 is error "A 32 bit processes cannot access modules of a 64 bit process"
Did you compile your own project as x64?
Hey I'm familiar with this problem -- see my answer on stackoverflow: https://stackoverflow.com/questions/36431220/getting-a-list-of-dlls-currently-loaded-in-a-process-c-sharp/41402293#41402293
Process.Modules()
is not a good solution
Edit: Also what lolp1 said, your program needs to be x64 too
i see in project code https://github.com/ZenLulz/MemorySharp/blob/deepening-project/src/MemorySharp/Modules/ModuleCore.cs var module = Process.GetCurrentProcess().Modules.Cast().FirstOrDefault Process.Modules Process.MainModule if in 64 is error "A 32 bit processes cannot access modules of a 64 bit process"
Did you compile your own project as x64?
yes platform target " x64" ."x86"","anycpu" ,select x64.
i see in project code https://github.com/ZenLulz/MemorySharp/blob/deepening-project/src/MemorySharp/Modules/ModuleCore.cs var module = Process.GetCurrentProcess().Modules.Cast().FirstOrDefault Process.Modules Process.MainModule if in 64 is error "A 32 bit processes cannot access modules of a 64 bit process"
Did you compile your own project as x64?
yes platform target " x64" ."x86"","anycpu" ,select x64.
Seems to work fine for me. Make sure you are using a x86 process compile (or x64) and enumerating the process modules of a compatible architecture. Though no idea what this issue has to do with MemorySharp for.
System.Diagnostics.Process.GetCurrentProcess().Modules.MainModule is a .net library function and not memorysharp.
i see in project code https://github.com/ZenLulz/MemorySharp/blob/deepening-project/src/MemorySharp/Modules/ModuleCore.cs
var module = Process.GetCurrentProcess().Modules.Cast().FirstOrDefault
Process.Modules
Process.MainModule
if in 64 is error "A 32 bit processes cannot access modules of a 64 bit process"