Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting a WIN32 DLL into a seperate process

Status
Not open for further replies.

jmarler

Programmer
Jan 29, 2001
679
US
I thought that I had read an article on MSDN one time that stated/showed how a standard WIN32 DLL could be loaded into another process space . . . has anyone else seen this, and do you remember where it was. And if not on MSDN, is there any info on this elsewhere? Thanks! - Jeff Marler B-)
 
Jeff-

You should be able to do a CreateThread, and in the thread function do a LoadLibrary and then do a GetProcAddress for the functions you want to call. Call FreeLibrary when you're done with the thread. This will not get you out-of-process, but at least it's in a separate thread-of-execution.

Is this what you're asking?

Chip H.
 
As I know, there is a way to make in WinNT a dll to load in each created process. For it, exists a key in the registry. But into a separate process as I remember can be loaded only exe program. Dll can be loaded only into a process created by an exe or an other dll. However a dll is loaded into a dll generated process, the root process will be an exe with its primary thread. John Fill
1c.bmp


ivfmd@mail.md
 
Chip,
It has to be in a seperate process and not just in a seperate thread . . . what I am looking at doing is reverse eng. some software, and I would like to hook into the API calls that it has to make at run time . . . I have a DLL that I put together that will allow me to monitor and log all API calls made from a Process that I started and am running in, but now I need to be able to somehow inject that DLL (or some similar logic) into another process so that I can monitor what it is doing.

- Jeff - Jeff Marler B-)
 
In the registry exists one key where you can put the name of your dll to load it automatically in all new generated processes. John Fill
1c.bmp


ivfmd@mail.md
 
John,
Really?! Do you know what that key is? It may be exactly what I need. Thanks for your help!

- Jeff - Jeff Marler B-)
 
I'm sure, but I don't remember what the key is. I'll find it in a book but not now, because the book is not here with me. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top