网站首页  词典首页

请输入您要查询的函数:

 

术语 createdesktopex
释义 CreateDesktopEx
语法:
C++
HDESK WINAPI CreateDesktopEx(
__in LPCTSTR lpszDesktop,
__reserved LPCTSTR lpszDevice,
__reserved LPDEVMODE pDevmode,
__in DWORD dwFlags,
__in ACCESS_MASK dwDesiredAccess,
__in_opt LPSECURITY_ATTRIBUTES lpsa,
__in ULONG ulHeapSize,
__reserved PVOID pvoid
);
CreateDesktopEx功能
创建一个具有指定的堆新的桌面,赞同调用进程的当前窗口警署,并将其分配给调用线程。调用进程必须有一个相应的窗口站,无论是在分配过程中创建时的制度或SetProcessWindowStation函数集。
参数
lpszDesktop [in]
桌面的名称创建。桌面名称是区分大小写,并且不能包含反斜杠字符(\\)。
lpszDevice
这个参数是保留,必须为NULL。
pDevmode
这个参数是保留,必须为NULL。
dwFlags [in]
此参数可以是零或以下的价值。
ValueMeaning
DF_ALLOWOTHERACCOUNTHOOK
0x0001Enables进程中的其他帐户运行在桌面上设置钩子在这一进程中。
dwDesiredAccess [in]
在要求进入桌面。对于一个值列表,请参阅桌面安全和访问权限。
此参数必须包括DESKTOP_CREATEWINDOW访问权,因为国内CreateDesktop使用句柄创建一个窗口。
lpsa [中,可选]
一个 SECURITY_ATTRIBUTES结构,决定是否返回的句柄可以被继承的子进程的指针。如果lpsa为NULL,则句柄不能被继承。
结构的lpSecurityDescriptor成员指定为新的桌面安全描述符。如果该参数为NULL,桌面继承父窗口站的安全描述符。
ulHeapSize [in]
在桌面堆的大小,以千字节为单位。
pvoid
这个参数是保留,必须为NULL。
返回值
如果函数成功,返回值是一个句柄到新创建的桌面上。如果指定的桌面上已经存在,函数成功并返回的句柄现有的桌面。当您使用完的处理,调用CloseDesktop函数将其关闭。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
如果dwDesiredAccess参数指定次数READ_CONTROL,WRITE_DAC,或WRITE_OWNER标准访问权限,您还必须要求DESKTOP_READOBJECTS和DESKTOP_WRITEOBJECTS访问权限。
在可以创建的计算机数量是有限的系统桌面堆的大小。桌面对象使用的堆存储资源。您可以增加数量的台式机,可以通过增加桌面堆的大小或减少默认堆的每个桌面交互窗口站预留创建。指定此值在以下注册表值的SharedSection子项:HKEY_LOCAL_MACHINE \\系统\\ CurrentControlSet \\控制\\ Session Manager的\\子系统\\窗口。此注册表值的默认数据如下:
的%SystemRoot%\\ system32 \\ csrss.exe ObjectDirectory = \\视窗的SharedSection = 1024,3072,512视窗=在SubSystemType =视窗ServerDll = basesrv,1 ServerDll = winsrv:UserServerDllInitialization,3 ServerDll = winsrv:ConServerDllInitialization,MaxRequestThreads 2 ProfileControl =关闭= 16
为的SharedSection子的值描述如下:
第一的SharedSection值是堆共享共同的台式机,以千字节大小。
第二个的SharedSection值是衡量每一项是在交互窗口站,WinSta0千字节为单位,创建桌面所需的桌面堆的大小。
在第三个SharedSection值是衡量每一项在一个交互式窗口站创建桌面千字节为单位,需要在桌面上堆的大小。
The default size of the desktop heap depends on factors such as hardware architecture.检索桌面的堆的大小,调用UOI_HEAPSIZE了GetUserObjectInformation功能。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
Unicode和ANSI namesCreateDesktopExW(Unicode)和CreateDesktopExA(ANSI)的
参见
CloseDesktop
台式机
SECURITY_ATTRIBUTES
SetProcessWindowStation
SwitchDesktop
窗口站和桌面功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==CreateDesktopEx Function
Creates a new desktop with the specified heap, associates it with the current window station of the calling process, and assigns it to the calling thread. The calling process must have an associated window station, either assigned by the system at process creation time or set by the SetProcessWindowStation function.
Syntax
C++
HDESK WINAPI CreateDesktopEx(
__in LPCTSTR lpszDesktop,
__reserved LPCTSTR lpszDevice,
__reserved LPDEVMODE pDevmode,
__in DWORD dwFlags,
__in ACCESS_MASK dwDesiredAccess,
__in_opt LPSECURITY_ATTRIBUTES lpsa,
__in ULONG ulHeapSize,
__reserved PVOID pvoid
);
Parameters
lpszDesktop [in]
The name of the desktop to be created. Desktop names are case-insensitive and may not contain backslash characters (\\).
lpszDevice
This parameter is reserved and must be NULL.
pDevmode
This parameter is reserved and must be NULL.
dwFlags [in]
This parameter can be zero or the following value.
ValueMeaning
DF_ALLOWOTHERACCOUNTHOOK
0x0001Enables processes running in other accounts on the desktop to set hooks in this process.

dwDesiredAccess [in]
The requested access to the desktop. For a list of values, see Desktop Security and Access Rights .
This parameter must include the DESKTOP_CREATEWINDOW access right, because internally CreateDesktop uses the handle to create a window.
lpsa [in, optional]
A pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle can be inherited by child processes. If lpsa is NULL, the handle cannot be inherited.
The lpSecurityDescriptor member of the structure specifies a security descriptor for the new desktop. If this parameter is NULL, the desktop inherits its security descriptor from the parent window station.
ulHeapSize [in]
The size of the desktop heap, in kilobytes.
pvoid
This parameter is reserved and must be NULL.
Return Value
If the function succeeds, the return value is a handle to the newly created desktop. If the specified desktop already exists, the function succeeds and returns a handle to the existing desktop. When you are finished using the handle, call the CloseDesktop function to close it.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
If the dwDesiredAccess parameter specifies the READ_CONTROL, WRITE_DAC, or WRITE_OWNER standard access rights, you must also request the DESKTOP_READOBJECTS and DESKTOP_WRITEOBJECTS access rights.
The number of desktops that can be created is limited by the size of the system desktop heap. Desktop objects use the heap to store resources. You can increase the number of desktops that can be created by increasing the size of the desktop heap or by reducing the default heap reserved for each desktop in the interactive window station. This value is specified in the SharedSection substring of the following registry value: HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\SubSystems\\Windows. The default data for this registry value is as follows:
%SystemRoot%\\system32\\csrss.exe ObjectDirectory=\\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16
The values for the SharedSection substring are described as follows:
The first SharedSection value is the size of the shared heap common to all desktops, in kilobytes.
The second SharedSection value is the size of the desktop heap needed for each desktop that is created in the interactive window station, WinSta0, in kilobytes.
The third SharedSection value is the size of the desktop heap needed for each desktop that is created in a noninteractive window station, in kilobytes.
The default size of the desktop heap depends on factors such as hardware architecture. To retrieve the size of the desktop heap, call the GetUserObjectInformation function with UOI_HEAPSIZE.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
Unicode and ANSI namesCreateDesktopExW (Unicode) and CreateDesktopExA (ANSI)
See Also
CloseDesktop
Desktops
SECURITY_ATTRIBUTES
SetProcessWindowStation
SwitchDesktop
Window Station and Desktop Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms682127(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:20:37