0 out of 1 rated this helpful - Rate this topic

OpenWindowStation function

Applies to: desktop apps only

Opens the specified window station.

Syntax

HWINSTA WINAPI OpenWindowStation(
  __in  LPTSTR lpszWinSta,
  __in  BOOL fInherit,
  __in  ACCESS_MASK dwDesiredAccess
);

Parameters

lpszWinSta [in]

The name of the window station to be opened. Window station names are case-insensitive.

This window station must belong to the current session.

fInherit [in]

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

dwDesiredAccess [in]

The access to the window station. For a list of access rights, see Window Station Security and Access Rights.

Return value

If the function succeeds, the return value is the handle to the specified window station.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.

Remarks

After you are done with the handle, you must call CloseWindowStation to free the handle.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

Unicode and ANSI names

OpenWindowStationW (Unicode) and OpenWindowStationA (ANSI)

See also

CloseWindowStation
ExitWindows
ExitWindowsEx
Window Station and Desktop Functions
Window Stations

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ