Enumerates all desktops associated with the specified window station of the calling process.
#Include <WinAPIEx.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. |
失败: | 返回 0 并设置 @error 标志为非 0 值. |
在MSDN中搜索
#Include <Array.au3>
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $Data = _WinAPI_EnumDesktops(_WinAPI_GetProcessWindowStation())
_ArrayDisplay($Data, '_WinAPI_EnumDesktops')