473,406 Members | 2,208 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,406 software developers and data experts.

Laptop/Tablet BatteryCycleCount for determining its health

Hello All,

Please help me to get information of Laptop/Tablet Battery with property "BatteryCycleCount". I am play with the below APIs but not found any significaint solution.

Expand|Select|Wrap|Line Numbers
  1. [DllImport("setupapi.dll", SetLastError = true)]
  2.         protected static extern IntPtr SetupDiGetClassDevs(ref Guid gClass, [MarshalAs(UnmanagedType.LPStr)] string strEnumerator, IntPtr hParent, uint nFlags);
  3.  
  4. [DllImport("setupapi.dll", SetLastError = true)]
  5.         protected static extern bool SetupDiEnumDeviceInterfaces(IntPtr lpDeviceInfoSet, uint nDeviceInfoData, ref Guid gClass, uint nIndex, ref SP_DEVICE_INTERFACE_DATA oInterfaceData);
  6.  
  7. [DllImport("setupapi.dll", SetLastError = true)]
  8.         protected static extern bool SetupDiGetDeviceInterfaceDetail(IntPtr lpDeviceInfoSet, ref SP_DEVICE_INTERFACE_DATA oInterfaceData, ref SP_DEVICE_INTERFACE_DETAIL_DATA oDetailData, uint nDeviceInterfaceDetailDataSize, ref uint nRequiredSize, IntPtr lpDeviceInfoData);
  9.  
  10. [DllImport("kernel32.dll", SetLastError = true)]
  11.         protected static extern IntPtr CreateFile([MarshalAs(UnmanagedType.LPStr)] string strName, uint nAccess, uint nShareMode, IntPtr lpSecurity, uint nCreationFlags, uint nAttributes, IntPtr lpTemplate);
  12.  
  13. [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  14.         public static extern bool DeviceIoControl([In] SafeHandle hDevice, [In] int dwIoControlCode, [In] IntPtr lpInBuffer, [In] int nInBufferSize, [Out] IntPtr lpOutBuffer, [In] int nOutBufferSize, out int lpBytesReturned, [In] IntPtr lpOverlapped);
Sanjay
Aug 7 '12 #1
0 1184

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Aaron | last post by:
I would like to use tablet pc sdk's text recognition feature in my c# app. I don't want the end-user to install tablet pc sdk, all they need is the nessesary dll's for the text recognition feature....
2
by: André | last post by:
I'm considering buying a Tablet PC and read somewhere (sorry, can't point to a link) that someone had tried running a "standard" Python program (wxMozilla demo I *think*, but can't be sure) that...
0
by: ray.bradbury9 | last post by:
Hello, First of all, sorry because of my poor english. I am having a weird problem that I don´t know how to solve. I am not sure even if it is a problem within the OS or the .NET Framework....
2
by: Al | last post by:
Hi, I wrote a similar application for getting ink input before release of the Windows XP Tablet PC edition. However, now I would like to use the Tablet PC Input Panel instead. Can anyone tell me...
1
by: eolsson | last post by:
I have a .NET application and have added handwriting (via the PenInputPanel class) for users with Tablet PCs. The problem I'm having is that if I call this class it throws a runtime error if the...
6
by: ronrsr | last post by:
here is my result. How do I determine the number of tuples in this array, returned from a mysql database? How do I determine the number of characters or entry in each tuple? thanks very much...
0
by: sanwan | last post by:
Windows XP Tablet PC http://microsoft.com/france/windows/xp/tabletpc/images/banner.jpg La nouvelle version du c¨¦l¨¨bre OS de Microsoft, Windows XP est diponible pour les PC au format Tablet....
5
by: jbenner | last post by:
I have opened a PMR for this with IBM, and am not asking for advice from the DB2 DBA community. I am posting this as an FYI that DB2 Health Monitor, even at the latest version of DB2, still can cause...
1
by: SetonSoftware | last post by:
I'm developing a VB.NET 2005 WinForms application that will run on a tablet PC. I want to build a screen resizer method that will position the forms and controls properly depending on whether the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...

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.