473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to create a new PowerScheme and set its Settings through C#

Hi

I would like to create a new power scheme and set its settings
appropriately. Are there any APIs available in .Net?

If not please suggest me, how can I achieve this through C# code.

Thanks
Cnu
Jul 22 '08 #1
3 1295
Cnu,

There are no .NET apis that expose the power management functionality.
You can make the calls to the API for power management through the P/Invoke
layer. The reference for the power management functions is here:

http://msdn.microsoft.com/en-us/libr...63(VS.85).aspx

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Duggi" <Du***************@gmail.comwrote in message
news:d3**********************************@m3g2000h sc.googlegroups.com...
Hi

I would like to create a new power scheme and set its settings
appropriately. Are there any APIs available in .Net?

If not please suggest me, how can I achieve this through C# code.

Thanks
Cnu

Jul 22 '08 #2
On Jul 22, 11:56*pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Cnu,

* * There are no .NET apis that expose the power management functionality.
You can make the calls to the API for power management through the P/Invoke
layer. *The reference for the power management functions is here:

http://msdn.microsoft.com/en-us/libr...63(VS.85).aspx

--
* * * * * - Nicholas Paldino [.NET/C# MVP]
* * * * * - m...@spam.guard.caspershouse.com

"Duggi" <DuggiSrinivasa...@gmail.comwrote in message

news:d3**********************************@m3g2000h sc.googlegroups.com...
Hi
I would like to create a new power scheme and set its settings
appropriately. Are there any APIs available in .Net?
If not please suggest me, how can I achieve this through C# code.
Thanks
Cnu- Hide quoted text -

- Show quoted text -
Thanks for the reply. I think there is no other way of doing it...

-Cnu
Jul 24 '08 #3
On Jul 22, 11:56*pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Cnu,

* * There are no .NET apis that expose the power management functionality.
You can make the calls to the API for power management through the P/Invoke
layer. *The reference for the power management functions is here:

http://msdn.microsoft.com/en-us/libr...63(VS.85).aspx

--
* * * * * - Nicholas Paldino [.NET/C# MVP]
* * * * * - m...@spam.guard.caspershouse.com

"Duggi" <DuggiSrinivasa...@gmail.comwrote in message

news:d3**********************************@m3g2000h sc.googlegroups.com...
Hi
I would like to create a new power scheme and set its settings
appropriately. Are there any APIs available in .Net?
If not please suggest me, how can I achieve this through C# code.
Thanks
Cnu- Hide quoted text -

- Show quoted text -
Hi

I do not see any API that helps to set "Turn off Monitor" value of the
current power scheme. Can you please help me with some sample code
please.

-Cnu
-Cnu
Jul 24 '08 #4

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

Similar topics

2
by: David Elliott | last post by:
I can create this: ?xml version="1.0" standalone="yes" ?> <ConfigOpt> <record> <Field_1>Text # 1</Field_1> <Field_2>Text # 2</Field_2> </record> </ConfigOpt>
2
by: Danny Springer | last post by:
I am trying to create the following xml file with VS 2005: <?xml version='1.0' encoding='utf-8'?> <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings"...
3
by: Luke Smith | last post by:
hi, i poster this to vsnet.general newsgroup but had no reply, sorry for xpost im trying to open a solution (same happens when making a new solution) but keep getting the following error message...
8
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1:...
2
by: Joe Rattz | last post by:
I am trying to create an XmlReader using XmlReader.Create, but it always returns {None}. I have tried several examples from the web, and Create always returns "{None}". Here is my code: ...
8
by: paraidy | last post by:
Hi all, as from object i need to read all byte from a file example c: \myphoto.jpg and recreate the file with another name to another directory c:\photo\recreatedphoto.jpg can someone write a...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
0
by: Dale | last post by:
Access 2000 I have a check scanner from Magtek, (MicrImage) This is like a "point of sale" check scanner/credit card reader. Magtek furnished 2 ocx's (MTMicrImage.ocx & SaxComm8.ocx). They also...
4
by: =?Utf-8?B?SlA=?= | last post by:
I have a C# DLL project I have created. The DLL plugs into other C#.NET applications. This DLL has several classes and methods comprised for 4 namespaces that are used by other programmer to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.