0
votes

Is there a way to call a function, that resides in a dll, (the dll is injected into a process) from that process?

By this I mean if i have myDLL.dll that exports a function, lets say void f(){do sth} and a process myProcess, "myDLL.dll" is injected using CreateRemoteThread(), can I call f() from myProcess so actually myProcess is the "user" that initiated the call to this function ?

I need to do this because I want the function f() not to be dependent by a certain program that can be killed in Task Manager, since employes can find the process and kill it. My manager asked me to do this because he thinks employees are doing other things than work.

2

2 Answers

1
votes

Just use the usual, LoadLibrary() and GetProcAddress()

0
votes

What you want to do probably won't work, and isn't the right approach anyway. The correct solution for preventing users from killing a process can be found here.