Parameters
lpszDesktop
[in] Pointer to a null-terminated string specifying the name of the desktop to be created. Desktop names are case-insensitive and may not contain backslash characters (\).
lpszDevice
Reserved; must be NULL.
pDevmode
Reserved; must be NULL.
dwFlags
[in] This parameter can be zero or the following value. Value
Meaning
DF_ALLOWOTHERACCOUNTHOOK
Enables processes running in other accounts on the desktop to set hooks in this process.
dwDesiredAccess
[in]
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] 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.