Function Reference


_WinAPI_EnumDesktops

Enumerates all desktops associated with the specified window station of the calling process

#include <WinAPISys.au3>
_WinAPI_EnumDesktops ( $hStation )

Parameters

$hStation Handle to the window station whose desktops are to be enumerated. This handle must have the
$WINSTA_ENUMDESKTOPS access right.

Return Value

Success: The array of the desktop names. The zeroth array element contains the number of desktop.
Failure: Sets the @error flag to non-zero.

Remarks

The _WinAPI_EnumDesktops() enumerates only those desktops for which the calling process has the
$DESKTOP_ENUMERATE access right.

See Also

Search EnumDesktops in MSDN Library.

Example

#include <Array.au3>
#include <WinAPISys.au3>

Local $aData = _WinAPI_EnumDesktops(_WinAPI_GetProcessWindowStation())

_ArrayDisplay($aData, '_WinAPI_EnumDesktops')