As I understand it, the "function" is to close all the windows and sunroof. This is done by turning the key in either front door to lock the doors, holding the key in the locked position will close any open window and sunroof. As a safety feature, within a few seconds the process can be reversed by holding the key in the unlocked position, however, this only applies if the "function" to close the windows was used.
Therefore, you cannot open the windows/sunroof by holding the key in the unlocked position if the car has been sitting with the doors locked. To do this, you have to hold the key in the locked position to activate the close "function" first, then hold in the unlocked position.
Hope that isn't too confusing