I believe there is such functions in winapi, you may try bing search on msdn.


3333333333