there are some winapi functions to retreive this kind of info, but i don't remember now =X