Enumerates all desktops associated with the specified window station of the calling process
#include <WinAPISys.au3>
_WinAPI_EnumDesktops ( $hStation )
$hStation | Handle to the window station whose desktops are to be enumerated. This handle must have the $WINSTA_ENUMDESKTOPS access right. |
Success: | The array of the desktop names. The zeroth array element contains the number of desktop. |
Failure: | Sets the @error flag to non-zero. |
The _WinAPI_EnumDesktops() enumerates only those desktops for which the calling process has the
$DESKTOP_ENUMERATE access right.
Search EnumDesktops in MSDN Library.
#include <Array.au3>
#include <WinAPISys.au3>
Local $aData = _WinAPI_EnumDesktops(_WinAPI_GetProcessWindowStation())
_ArrayDisplay($aData, '_WinAPI_EnumDesktops')