Den 21-01-2014 21:08, Jason Kretzer skrev:
> Is there a Qt way of getting a handle for a running windows process(or
> just checking if a certain .exe is currently executing) and determining
> how long it has been running?

No, this isn't something you can do in Qt. You have to do platform 
specific code for it.

Which means it's now off topic on the Qt list, but here you go anyway :)

You can use EnumProcesses() to go through all the processes to find the 
one you are looking for.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682629(v=vs.85).aspx

And GetProcessTimes to get the timing you need.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms683223(v=vs.85).aspx

I hope this helps,

Bo.

-- 
Bo Thorsen, European Engineering Manager, ICS
Integrated Computer Solutions. Delivering World-Class Applications
http://ics.com/services
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to