Page 1 of 1

CE and dll pointers

Posted: Thu Dec 10, 2015 11:38 pm
by lisa
Ok so pretty much most of my CE usage was in RoM and the pointer statics were always client.exe but I have been playing around with a game lately and every single pointer result is a .dll

Ok so I have a pointer which has been reliable and works fine in CE and uses "OpenAL64.dll" + #####
So is there a way to use the dll name to get the value of where to start pointer? The value changes every time I start game.

I have found a static which seems to be the value of the "OpenAL64.dll" and I will probably do some testing using that to see if it's reliable or not but getting the value of the .dll like CE has would make it easier/more reliable.

Re: CE and dll pointers

Posted: Fri Dec 11, 2015 3:23 am
by BlubBlab
You mean this ?
number process.getModuleAddress(number procId, string moduleName)

Look up the address of a module within a process and return its origin address. Often this is used to lookup the location where a DLL is loaded. 'moduleName' should be the full name. i.e. "whatever.dll" If the function fails or it could not locate the module, it returns nil.

Re: CE and dll pointers

Posted: Fri Dec 11, 2015 5:46 am
by lisa
ahh yeah I didn't know that would be called a module =)

I'll have to play with it more, currently getting nil

Code: Select all

local procid = process.findByWindow(window.find(targetWindowName, targetWindowClass))
-- procid works fine as it is used in other areas such as
proc = process.open(procid)

process.getModuleAddress(procid, "OpenAL64.dll")
-- is nil, copy pasted name from CE so it has to be right.

Re: CE and dll pointers

Posted: Fri Dec 11, 2015 12:35 pm
by Administrator
I suppose it could be because it's a 64-bit version and the code might not account for that. Can you test this with another 32 and 64 bit application?

Re: CE and dll pointers

Posted: Sat Dec 12, 2015 2:21 am
by BlubBlab
You can also try

Code: Select all

/*	process.getModules(number procId)
Returns (on success):	table(name => address pairs)
Returns (on failure):	nil

Returns a list of all available modules in a process as key/value pairs.
*/
One thing to note doing this with the 32-bit version of MM2 to an 64-bit process won't work only the other way around.