There is no standard way to do it. If you can and how you do it depends on your platform / compiler. There is Windows API function for Windows, but I can't remember exactly what it is.