A first process executes a function in a second process. The second
process may be a remote or local process. The first process may control
the second process by executing a specified function in the second
process. The first process may allocate space in the second process and
create a stub function in the allocated space. The first process then may
create a thread which runs the stub function. When the stub function is
called from the first process, the stub function may call the arbitrary
function, passing it the required parameters, thus enabling the first
process to execute the desired function in the second process. The
desired process may require any number and type of additional parameters
and return any number and type of results.