extra enforce for GetStdHandle