C# Класс UlteriusServer.Api.Win32.Desktop

Encapsulates the Desktop API.
Наследование: IDisposable, ICloneable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Default Desktop
Input Desktop

Открытые методы

Метод Описание
Clone ( ) : object

Creates a new Desktop object with the same desktop open.

Close ( ) : bool

Closes the handle to a desktop.

Create ( string name ) : bool

Creates a new desktop. If a handle is open, it will be closed.

CreateDesktop ( string name ) : Desktop

Creates a new desktop.

CreateProcess ( string path ) : Process

Creates a new process in a desktop.

CreateProcess ( string path, string desktop ) : Process

Creates a new process on the specified desktop.

Desktop ( ) : System

Creates a new Desktop object.

Dispose ( ) : void

Dispose Object.

Dispose ( bool disposing ) : void

Dispose Object.

Exists ( string name ) : bool

Checks if the specified desktop exists (using a case sensitive search).

Exists ( string name, bool caseInsensitive ) : bool

Checks if the specified desktop exists.

GetCurrent ( ) : Desktop

Gets the desktop of the calling thread.

GetDesktopName ( Desktop desktop ) : string

Gets the name of a given desktop.

GetDesktopName ( IntPtr desktopHandle ) : string

Gets the name of a desktop from a desktop handle.

GetDesktops ( ) : string[]

Enumerates all of the desktops.

GetInputProcesses ( ) : System.Diagnostics.Process[]

Gets an array of all the processes running on the Input desktop.

GetWindows ( ) : WindowCollection

Enumerates the windows on a desktop.

Open ( string name ) : bool

Opens a desktop.

OpenDefaultDesktop ( ) : Desktop

Opens the default desktop.

OpenDesktop ( string name ) : Desktop

Opens a desktop.

OpenInput ( ) : bool

Opens the current input desktop.

OpenInputDesktop ( ) : Desktop

Opens the current input desktop.

Prepare ( ) : void

Prepares a desktop for use. For use only on newly created desktops, call straight after CreateDesktop.

SetCurrent ( Desktop desktop ) : bool

Sets the desktop of the calling thread. NOTE: Function will fail if thread has hooks or windows in the current desktop.

Show ( ) : bool

Switches input to the currently opened desktop.

Show ( string name ) : bool

Switches to the specified desktop.

ToString ( ) : string

Gets the desktop name.

Приватные методы

Метод Описание
CheckDisposed ( ) : void
CloseDesktop ( IntPtr hDesktop ) : bool
CreateDesktop ( string lpszDesktop, IntPtr lpszDevice, IntPtr pDevmode, int dwFlags, long dwDesiredAccess, IntPtr lpsa ) : IntPtr
CreateProcess ( string lpApplicationName, string lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandles, int dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, STARTUPINFO &lpStartupInfo, PROCESS_INFORMATION &lpProcessInformation ) : bool
Desktop ( IntPtr desktop ) : System
DesktopProc ( string lpszDesktop, IntPtr lParam ) : bool
DesktopWindowsProc ( IntPtr wndHandle, IntPtr lParam ) : bool
EnumDesktopWindows ( IntPtr hDesktop, EnumDesktopWindowsProc lpfn, IntPtr lParam ) : bool
EnumDesktops ( IntPtr hwinsta, EnumDesktopProc lpEnumFunc, IntPtr lParam ) : bool
GetCurrentThreadId ( ) : int
GetProcessId ( IntPtr process ) : int
GetProcessWindowStation ( ) : IntPtr
GetThreadDesktop ( int dwThreadId ) : IntPtr
GetThreadId ( IntPtr thread ) : int
GetUserObjectInformation ( IntPtr hObj, int nIndex, IntPtr pvInfo, int nLength, int &lpnLengthNeeded ) : bool
GetWindowText ( IntPtr hWnd, IntPtr lpString, int nMaxCount ) : int
OpenDesktop ( string lpszDesktop, int dwFlags, bool fInherit, long dwDesiredAccess ) : IntPtr
OpenInputDesktop ( int dwFlags, bool fInherit, long dwDesiredAccess ) : IntPtr
SetThreadDesktop ( IntPtr hDesktop ) : bool
SwitchDesktop ( IntPtr hDesktop ) : bool
WTSGetActiveConsoleSessionId ( ) : int

Описание методов

Clone() публичный Метод

Creates a new Desktop object with the same desktop open.
public Clone ( ) : object
Результат object

Close() публичный Метод

Closes the handle to a desktop.
public Close ( ) : bool
Результат bool

Create() публичный Метод

Creates a new desktop. If a handle is open, it will be closed.
public Create ( string name ) : bool
name string The name of the new desktop. Must be unique, and is case sensitive.
Результат bool

CreateDesktop() публичный статический Метод

Creates a new desktop.
public static CreateDesktop ( string name ) : Desktop
name string The name of the desktop to create. Names are case sensitive.
Результат Desktop

CreateProcess() публичный Метод

Creates a new process in a desktop.
public CreateProcess ( string path ) : Process
path string Path to application.
Результат System.Diagnostics.Process

CreateProcess() публичный статический Метод

Creates a new process on the specified desktop.
public static CreateProcess ( string path, string desktop ) : Process
path string Path to application.
desktop string Desktop name.
Результат System.Diagnostics.Process

Desktop() публичный Метод

Creates a new Desktop object.
public Desktop ( ) : System
Результат System

Dispose() публичный Метод

Dispose Object.
public Dispose ( ) : void
Результат void

Dispose() публичный Метод

Dispose Object.
public Dispose ( bool disposing ) : void
disposing bool True to dispose managed resources.
Результат void

Exists() публичный статический Метод

Checks if the specified desktop exists (using a case sensitive search).
public static Exists ( string name ) : bool
name string The name of the desktop.
Результат bool

Exists() публичный статический Метод

Checks if the specified desktop exists.
public static Exists ( string name, bool caseInsensitive ) : bool
name string The name of the desktop.
caseInsensitive bool If the search is case INsensitive.
Результат bool

GetCurrent() публичный статический Метод

Gets the desktop of the calling thread.
public static GetCurrent ( ) : Desktop
Результат Desktop

GetDesktopName() публичный статический Метод

Gets the name of a given desktop.
public static GetDesktopName ( Desktop desktop ) : string
desktop Desktop Desktop object whos name is to be found.
Результат string

GetDesktopName() публичный статический Метод

Gets the name of a desktop from a desktop handle.
public static GetDesktopName ( IntPtr desktopHandle ) : string
desktopHandle System.IntPtr
Результат string

GetDesktops() публичный статический Метод

Enumerates all of the desktops.
public static GetDesktops ( ) : string[]
Результат string[]

GetInputProcesses() публичный статический Метод

Gets an array of all the processes running on the Input desktop.
public static GetInputProcesses ( ) : System.Diagnostics.Process[]
Результат System.Diagnostics.Process[]

GetWindows() публичный Метод

Enumerates the windows on a desktop.
public GetWindows ( ) : WindowCollection
Результат WindowCollection

Open() публичный Метод

Opens a desktop.
public Open ( string name ) : bool
name string The name of the desktop to open.
Результат bool

OpenDefaultDesktop() публичный статический Метод

Opens the default desktop.
public static OpenDefaultDesktop ( ) : Desktop
Результат Desktop

OpenDesktop() публичный статический Метод

Opens a desktop.
public static OpenDesktop ( string name ) : Desktop
name string The name of the desktop to open.
Результат Desktop

OpenInput() публичный Метод

Opens the current input desktop.
public OpenInput ( ) : bool
Результат bool

OpenInputDesktop() публичный статический Метод

Opens the current input desktop.
public static OpenInputDesktop ( ) : Desktop
Результат Desktop

Prepare() публичный Метод

Prepares a desktop for use. For use only on newly created desktops, call straight after CreateDesktop.
public Prepare ( ) : void
Результат void

SetCurrent() публичный статический Метод

Sets the desktop of the calling thread. NOTE: Function will fail if thread has hooks or windows in the current desktop.
public static SetCurrent ( Desktop desktop ) : bool
desktop Desktop Desktop to put the thread in.
Результат bool

Show() публичный Метод

Switches input to the currently opened desktop.
public Show ( ) : bool
Результат bool

Show() публичный статический Метод

Switches to the specified desktop.
public static Show ( string name ) : bool
name string Name of desktop to switch input to.
Результат bool

ToString() публичный Метод

Gets the desktop name.
public ToString ( ) : string
Результат string

Описание свойств

Default публичное статическое свойство

Opens the default desktop.
public static Desktop,UlteriusServer.Api.Win32 Default
Результат Desktop

Input публичное статическое свойство

Opens the desktop the user if viewing.
public static Desktop,UlteriusServer.Api.Win32 Input
Результат Desktop