All functions that return a window handle or pass a window handle to an enumeration function treat windows created by the calling process differently from those created by other processes. Windows created by the calling process are already opened and can be returned or passed to the enumeration function without restriction. If the prospective window to be returned or enumerated was not created by the calling process, the process must have DESKTOP_ENUMWINDOWS access permission in the window's desktop and the window itself must have WINDOW_ENUMWINDOW access permission. If both conditions are met the window is opened for the process and returned or passed to the enumeration function. If not, the window is ignored and the function proceeds to the next applicable window.