# using drivers in c++ help



## ste2425 (Jul 24, 2010)

Is it possible to open and use a driver file in c++ for some form of variables?
My reason is my wireless keyboard and mouse had a little program that would show up on the bottom of the screen and a light would come on on that programme when the batteries are running low, saving me from an un-usable keyboard or mouse if they die without warning. Im assuming its the driver file that monitors that batteries level and changes some form of variable to let the included programe no there low. The reason i want to make the programe is ive lost the cd it came on, and my keyboard is a cheap mikomi one and there is no form of website for them. Searched everywhere. I can make the bit where a box shows on screen and it will change colour but i dont no how to open a driver up to see if theres anything to do with battery levels in it. Hope this makes sense and you guys can help with this

ste


----------



## ctrain (Jul 25, 2010)

Changing much of anything is pretty much out of the question if it installs an actual driver.

and as a fun fact, drivers are generally written in C.


----------



## ste2425 (Jul 25, 2010)

i didnt want to change the driver, just open it and use values from it. But if there written in C then this ideas dead in the water anyway


----------



## Kreij (Jul 25, 2010)

The keyboard probably has some kind of register in it that holds the battery level info. 
You would need to write a program that regularly poll the register to see what the battery level is, and report when the level drops below some threshhold value.
How you find information on the keyboard's registers and whatever else you may need, is another story.

Yes, you could write something like that in C++. You may want to ask W1zzard if he could shed any light on how you might go about this little project.


----------



## W1zzard (Jul 25, 2010)

no way without analyzing the software [that you can't anymore]


----------



## ste2425 (Jul 25, 2010)

meh ok well thanks guys anyway, i thought it would be a little easier, as say a variable =1 when batteries are low and then i could just write a programme that watches that variable when it changes it shows low battery. Oh well thanks anyway


----------

