函数参考


_WinAPI_CreateWindowStation

Creates a window station object, associates it with the calling process, and assigns it to the current session.

#Include <WinAPIEx.au3>
_WinAPI_CreateWindowStation ( [$sName [, $iAccess [, $iFlags [, $tSecurity]]]] )

参数

$sName [可选参数] The name of the window station to be created. Window station names are case-insensitive and cannot
contain backslash characters (\). Only members of the Administrators group are allowed to specify
a name. If lthis parameter is empty string, the system forms a window station name using the logon
session identifier for the calling process.
$iAccess [可选参数] The type of access the returned handle has to the window station. This parameter can be one or
more of the following values.

$WINSTA_ALL_ACCESS
$WINSTA_ACCESSCLIPBOARD
$WINSTA_ACCESSGLOBALATOMS
$WINSTA_CREATEDESKTOP
$WINSTA_ENUMDESKTOPS
$WINSTA_ENUMERATE
$WINSTA_EXITWINDOWS
$WINSTA_READATTRIBUTES
$WINSTA_READSCREEN
$WINSTA_WRITEATTRIBUTES
$iFlags [可选参数] The optional flags. It can be zero or the following value.

$CWF_CREATE_ONLY
$tSecurity [可选参数] $tagSECURITY_ATTRIBUTES structure that determines whether the returned handle can be inherited by
child processes. If this parameter is 0, the handle cannot be inherited.

返回值

Success Handle to the newly created window station. If the specified window station already exists,
失败: 返回 0 并设置 @error 标志为非 0 值.

注意/说明

After you are done with the handle, you must call _WinAPI_CloseWindowStation() to free the handle.

相关

详情参考

在MSDN中搜索