-
October 3rd, 2017, 06:43 PM
#1
Passing some parameters from 64bit exe to 32bit dll?
The caveat is that it works, you can call over from 64bit exe to 32bit dll...
I need to use a 32bit dll in that case is that I need to use that dll to hook a 32bit program.
And now I want to supply some parameter information to the dll, which is just a path name.
Any ways I can easily achieve this?
Thanks
Jack
-
October 6th, 2017, 11:21 PM
#2
Re: Passing some parameters from 64bit exe to 32bit dll?
So pass the string parameter. Why ask, just do it?
-
October 10th, 2017, 04:45 PM
#3
Re: Passing some parameters from 64bit exe to 32bit dll?
Originally Posted by luckiejacky
The caveat is that it works, you can call over from 64bit exe to 32bit dll...
No, basically you cannot. To call a dll code you need to load the dll to your process. And there is no way to load a dll to a process of different architecture, i.e. 32-bit to 64-bit and vice versa. So there is no way to "supply parameter information to the dll" unless your definitions of "call over ... to", "supply", "parameter" and "information" are something different from comonly used terms.
And one only exception I can imagine is a 32-bit COM dll registerd very special way that indeed can be "called" by 64-bit process, that technically is hardly possible to combine with hooking dll because of a number of factors I don't want to discuss right now.
So you'd better provide some more details, in case you really need a solution to your problem.
As long as we started talking about hooking dlls, you need to know that you cannot install a 32-bit hook from 64-bit process. Becase you need to know the hook proc address, which can be found only when you load the dll to the process, which loading is not possible because of architecture mismatch.
And even when you managed to install the global hook, your dll runs in the victim process on its own, so it has to read the path somehow independent from the hook installer process, and then why wouldn't it just be read from a well known source, registry for example, or side-by-side ini file?
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|