Skip to content

Latest commit

 

History

History
130 lines (95 loc) · 4.22 KB

nf-winuser-openinputdesktop.md

File metadata and controls

130 lines (95 loc) · 4.22 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name req.apiset
NF:winuser.OpenInputDesktop
OpenInputDesktop function (winuser.h)
Opens the desktop that receives user input.
DF_ALLOWOTHERACCOUNTHOOK
OpenInputDesktop
OpenInputDesktop function [Windows Stations and Desktops]
base.openinputdesktop
winstation.openinputdesktop
winuser/OpenInputDesktop
winstation\openinputdesktop.htm
winstation
023d421e-bf32-4e08-b5b3-b7b2ca6c4e00
12/05/2018
DF_ALLOWOTHERACCOUNTHOOK, OpenInputDesktop, OpenInputDesktop function [Windows Stations and Desktops], base.openinputdesktop, winstation.openinputdesktop, winuser/OpenInputDesktop
winuser.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
User32.lib
User32.dll
Windows
19H1
OpenInputDesktop
winuser/OpenInputDesktop
c++
APIRef
kbSyntax
DllExport
User32.dll
Ext-MS-Win-NTUser-Windowstation-l1-1-1.dll
api-ms-win-rtcore-ntuser-windowstation-l1-1-0.dll
Ext-MS-Win-NTUser-WindowStation-L1-1-2.dll
OpenInputDesktop
ext-ms-win-ntuser-windowstation-l1-1-1 (introduced in Windows 8.1)

OpenInputDesktop function

-description

Opens the desktop that receives user input.

-parameters

-param dwFlags [in]

This parameter can be zero or the following value.

Value Meaning
DF_ALLOWOTHERACCOUNTHOOK
0x0001
Allows processes running in other accounts on the desktop to set hooks in this process.

-param fInherit [in]

If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the processes do not inherit this handle.

-param dwDesiredAccess [in]

The access to the desktop. For a list of access rights, see Desktop Security and Access Rights.

-returns

If the function succeeds, the return value is a handle to the desktop that receives user input. 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

The calling process must have an associated window station, either assigned by the system when the process is created, or set by the SetProcessWindowStation function. The window station associated with the calling process must be capable of receiving input.

If the calling process is running in a disconnected session, the function returns a handle to the desktop that becomes active when the user restores the connection.

An application can use the SwitchDesktop function to change the input desktop.

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.

-see-also

CloseDesktop

Desktops

SetProcessWindowStation

SwitchDesktop

Window Station and Desktop Functions