473,563 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.

May 16 '06 #1
2 2702
cdrsir wrote:
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-lit...t.html#faq-5.9

Cheers! --M

May 16 '06 #2
On Tue, 16 May 2006 11:25:43 UTC, "cdrsir" <cd****@gmail.c om> wrote:
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
May 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
1875
by: Giovanni Bajo | last post by:
Hello, python24.dll is much bigger than python23.dll. This was discussed already on the newsgroup, see the thread starting here: http://mail.python.org/pipermail/python-list/2004-July/229096.html I don't think I fully understand the reason why additional .pyd modules were built into the .dll. OTOH, this does not help anyone, since: -...
9
10874
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent the wheel, right? Everything so far is working well with the Active Directory. The problem I am having is with adding File Permissions to a...
2
4567
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET Here's the scenario: 1. .NET Windows Client on a remote machine makes a web service call to update tables on a Web Server running SQL Server...
7
4776
by: Peter Afonin | last post by:
Hello, I'm using this code to access a network share from an asp.net page: Dim dir As DirectoryInfo = New DirectoryInfo("\\10.0.0.150\FormLib\") Dim files() As FileInfo = dir.GetFiles("*.eps") When I try to do it, I get this error: System.UnauthorizedAccessException: Access to the path
4
11098
by: Liverpool fan | last post by:
I have a windows application written using VB .NET that encompasses a countdown timer modal dialog. The timer is a System.Timers.Timer with an interval of 1 second. AutoReset is not set so accepts the default of True. The Elapsed event handler updates the dialog box with how long before it will close, acting as a timer itself. The dialog has a...
0
1785
by: Daniel | last post by:
System.Diagnostics.Process.Start fails on windows server 2003 the process returns process.ExitCode == 0 but executing any process with System.Diagnostics.Process.Start on windows xp works fine. anything to do different for windows server 2003? some special permission for the process that executes another executable with...
3
3991
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user selects? thanks...
11
11916
by: Jon Davis | last post by:
Does anyone know why using System.Diagnostics.Process to "wrap" a console application does not always transmit the I/O, depending on what processes you're trying to "consume"? PowerShell, for example, does not seem to process any I/O through the Process object. I know that in the case of PowerShell there are better ways to "wrap" the...
5
3285
by: Saya | last post by:
Hi Folks, I have now spend app. 3 days to get the below scenario to work, but can not get there! ..Net version = 2.0.50727 Windows version = Microsoft Windows = Windows Server 2003 Now I have to develop a webservice which is run on the server. The
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.