PDA

View Full Version : QProcess and Windows CreateProcessAsUser



dswartz
8th March 2012, 19:18
I am am able to spawn an external process in my QT application for windows with a WinAPI call to CreateProcessAsUser(), but I am unable to interact with it. In other words, I cannot receive data back from the process, nor am I able to wait for it to finish. I found that QProcess has a lot nice features that would help me do this, but I don't know how to create a QProcess with a windows user handle. More specifically, I have the following line of code...

CreateProcessAsUser( currentUserHandle, L"winhelper.exe ", myCmdW, NULL, NULL, FALSE, REALTIME_PRIORITY_CLASS, NULL, NULL,&startupInfo, &ProcInfo);

And I would love to find a way to use QProcess to do the same thing so I can read data back from the process. Any suggestions? Thanks in advance!

- Dan