Hey u all , thank you very much for supporting me. I hav gone inside the problem and found something similar which you ppl suggested. How about achieve this by considering the way of fual level detection of auto mobiles ? (simply it's a floter with a potentiometer).
And the bottem line It is recommended to implement the project with C++. (should be work under kernal and user mode OS in the samw way)
Thanks a lot for your ideas.