Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 13:35

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Calling OpenProcess / ReadProcessMemory from injected DLL

Discussion on Calling OpenProcess / ReadProcessMemory from injected DLL within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2006
Posts: 21
Received Thanks: 0
Calling OpenProcess / ReadProcessMemory from injected DLL

Ok, so I have a strange problem and am totally confused as to what is happening.

I am hooking Conquer and getting decrypted packets. Where I hook the function I get a pointer to a memory address where I need to read the decrypted packet from along with the length.

The problem is that for some reason when I first hook the Conquer, I always get an ERROR_INVALID_HANDLE (0x06) error code when I try OpenProcess or ReadProcessMemory from the injected DLL.

The even weirder part is that after about 1-2 minutes, it starts to work fine with no more errors! (i.e. for 1-2 minutes all the OpenProcess / ReadProcessMemory attempts will return an error and zeroes and then for some reason after 1-2 minutes it starts to work fine with no issues at all)


Does anyone have any idea what might be happening here?

Edit: Nevermind, I have solved it by simply using Marshal.Copy rather than using OpenProcess/ReadProcessMemory
matt69 is offline  
Old 12/23/2016, 12:56   #2
 
elite*gold: 0
Join Date: Jul 2014
Posts: 402
Received Thanks: 540
Quote:
Originally Posted by matt69 View Post
Edit: Nevermind, I have solved it by simply using Marshal.Copy rather than using OpenProcess/ReadProcessMemory
^ Yeah, the DLL you injected already has access to the entire process that it's injected into, so there's no need for OpenProcess.

What you could do, if you really want to use the Read/WriteProcessMemory functions from inside the DLL is to use the function to obtain a handle for the current process that can be passed to the Read/WriteProcessMemory functions.
Best Coder 2014 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" Problem
03/06/2012 - .NET Languages - 9 Replies
Deleted
OpenProcess Problem
09/24/2010 - General Coding - 1 Replies
Hi leute Seit dem ich wieder 32 bit system drauf habe funktioniert mein memory scanner bei programmen mit hackshield nicht mehr da ich glaube "OpenProcess" nicht ausgeführt werden kann. Könnt ihr mir da vlt etwas zu sagen ? mfg lazeboy
vb.net OpenProcess() returns zero
10/24/2009 - .NET Languages - 6 Replies
Hey guys, n00b here.. Im trying to read the Aion memory via vb.net OpenProcess(&H10, false, pid) function, but it returns always 0. I guess this is bcs of the missing read rights? is there any workaround? how do others manage to get read access? cheers :handsdown:
OpenProcess(Again)
10/20/2007 - Kal Online - 1 Replies
Hi, why can't i still open Kal process? i tried with Autoit and C++.. here is what i've done to open with c++ #include <iostream> #include <windows.h>
OpenProcess + engine.exe?
10/08/2007 - Kal Online - 10 Replies
Hi, when i use OpenProcess api, it doesn't open engine.exe? it always returns 0.. is there another way to open engine.exe process? like CE opens it correctly.. babel vista translation: Hallo, wann verwende ich OpenProcess API, es nicht geöffnetes engine.exe? es bringt immer 0. zurück. gibt es eine andere Weise, engine.exe Prozeß zu öffnen? wie CER öffnet es richtig.



All times are GMT +1. The time now is 13:35.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.