how to use c++ to get the system process in windows?

C

cdrsir

I have a TV-card installed on my computer, which has a remote
controller.

so when I go to sleep, I can close the TV-programm via the remote
controller, but the computer is still on. I have to leave my bed and
shutdown the computer ...

I just want to write a small program that if the TV-programm is closed,
this small programm should then shut down my computer automatically.

I think the only way is to read the process name of this TV-programm
from the Windows Task-Manager. But how?

ps: I have VC++ at hand. maybe there is already some nice function
provided.
 
M

mlimber

cdrsir said:
I have a TV-card installed on my computer, which has a remote
controller.

so when I go to sleep, I can close the TV-programm via the remote
controller, but the computer is still on. I have to leave my bed and
shutdown the computer ...

I just want to write a small program that if the TV-programm is closed,
this small programm should then shut down my computer automatically.

I think the only way is to read the process name of this TV-programm
from the Windows Task-Manager. But how?

ps: I have VC++ at hand. maybe there is already some nice function
provided.

Your question is not concerned with the C++ language and libraries
proper. Please post in a Microsoft newsgroup. For what is on-topic in
this group and for a list of better places to post, see this FAQ:

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9

Cheers! --M
 
D

David

I have a TV-card installed on my computer, which has a remote
controller.

so when I go to sleep, I can close the TV-programm via the remote
controller, but the computer is still on. I have to leave my bed and
shutdown the computer ...

Why not use the Windows power save options? You could allow the
monitor and perhaps the whole system to shutdown when there is
no activity. No need to write anything.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top