BBC BASIC for Windows
Programming >> Operating System >> Laptop Charge http://bb4w.conforums.com/index.cgi?board=os&action=display&num=1301745178 Laptop Charge
Post by JB91 on Apr 2nd, 2011, 11:52am
I wasn't sure which category to put this in, but how would you be able to get the current level of charge on a laptop?
Josh.
Re: Laptop Charge
Post by admin on Apr 2nd, 2011, 5:42pm
Can you provide an example program, because whenevre I do it, it seems to fail...
I can't see anything particularly difficult that might be causing your problem; it appears to be a straightforward API to use. Do make sure you adhere to the MSDN documentation in every detail.
The only pitfall I can see which might possibly trip you up is that the Spare1[4] in the SYSTEM_BATTERY_STATE structure must be converted to Spare1%(3) in BBC BASIC, because the suffix is the maximum value of the subscript not the number of elements.
If you're still having problems, post the code which is failing. Re: Laptop Charge
Post by JB91 on Apr 3rd, 2011, 2:34pm