I think this is only possible with WINAPI functions.
http://msdn.microsoft.com/en-us/library/ms646293%28VS.85%29.aspx