In C++ its possible. Check out - http://msdn.microsoft.com/en-us/library/ms724947.aspx Specially the Desktop params