O
Ozo
I am having problems starting an MFC application in remote using
psexec (from http://www.sysinternals.com/). It works well with most
applications (ex: notepad.exe), but it creates problems with MFC
applications. The application starts, but it aborts with an
"Application Error" saying "Windows cannot continue from this
exception".
We then wrote our own psexec-like tool to spawn remote applications,
but we have the same problem. The way psexec (and our tool) works, is
by starting a service on the remote computer, which then waits for a
request to start a process locally. When the psexec service is
started (like ours), it runs as a child process of the services.exe
Windows process.
We found this suspicious and so we modified our own tool; Instead of
starting a service on the remote machine that waits for remote-spawn
requests, we changed it to simply start a regular user-mode process
that does the same thing (i.e. wait for requests to spawn a process).
Now, because it is a regular user-mode process, and because we start
it locally on the computer, it is no more a child of the services.exe
process. With this new scheme, all our MFC application can be
remotely spawn without any problem. So a quick conclusion seems to be
that a process that is a child of services.exe can not spawn an MFC
process.
Now, the question is why? What is going on with MFC that stops psexec
from spawning it? Is there something special I should know about
security attributes and all that stuff?
Thanks,
Ozo.
psexec (from http://www.sysinternals.com/). It works well with most
applications (ex: notepad.exe), but it creates problems with MFC
applications. The application starts, but it aborts with an
"Application Error" saying "Windows cannot continue from this
exception".
We then wrote our own psexec-like tool to spawn remote applications,
but we have the same problem. The way psexec (and our tool) works, is
by starting a service on the remote computer, which then waits for a
request to start a process locally. When the psexec service is
started (like ours), it runs as a child process of the services.exe
Windows process.
We found this suspicious and so we modified our own tool; Instead of
starting a service on the remote machine that waits for remote-spawn
requests, we changed it to simply start a regular user-mode process
that does the same thing (i.e. wait for requests to spawn a process).
Now, because it is a regular user-mode process, and because we start
it locally on the computer, it is no more a child of the services.exe
process. With this new scheme, all our MFC application can be
remotely spawn without any problem. So a quick conclusion seems to be
that a process that is a child of services.exe can not spawn an MFC
process.
Now, the question is why? What is going on with MFC that stops psexec
from spawning it? Is there something special I should know about
security attributes and all that stuff?
Thanks,
Ozo.