C# Класс CairoDesktop.Interop.NativeMethods

Container class for Win32 Native methods used within the desktop application (e.g. shutdown, sleep, et al).
Показать файл Открыть проект

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

Метод Описание
FindWindow ( string className ) : IntPtr
GetIconForWindow ( IntPtr HWnd ) : uint
GetWindowRectangle ( IntPtr windowHandle ) : RECT
Logoff ( ) : void

Calls the logoff method on the Win32 API.

PostWindowsMessage ( IntPtr hWnd, uint callback, uint uid, uint messageId ) : void
Reboot ( ) : void

Calls the reboot method on the Win32 API.

Shutdown ( ) : void

Calls the shutdown method on the Win32 API.

Sleep ( ) : void

Calls the Sleep method on the Win32 Power Profile API.

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

Метод Описание
AdjustTokenPrivileges ( IntPtr tokenHandle, bool disableAllPrivileges, CairoDesktop.Interop.TOKEN_PRIVILEGES &newState, uint bufferLength, IntPtr previousState, IntPtr returnLength ) : bool
AdjustTokenPrivilegesForShutdown ( ) : void

Adjusts the current process's token privileges to allow it to shut down or reboot the machine. Throws an ApplicationException if an error is encountered.

BringWindowToTop ( IntPtr hWnd ) : bool
CloseHandle ( Int32 Handle ) : Int32
CreateWindowEx ( int dwExStyle, string lpClassName, string lpWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hwndParent, IntPtr hMenu, IntPtr hInstance, IntPtr lParam ) : IntPtr
DeregisterShellHookWindow ( IntPtr hWnd ) : bool
ExitWindowsEx ( uint flags, uint reason ) : bool
FindWindow ( string className, string windowName ) : IntPtr
GetClassLong ( IntPtr handle, int longClass ) : uint
GetDesktopWindow ( ) : IntPtr
GetModuleHandle ( string filename ) : IntPtr
GetSystemMetrics ( int Index ) : int
GetWindowRect ( IntPtr hWnd, RECT &lpRect ) : bool
LookupPrivilegeValue ( string host, string name, long &pluid ) : bool
MoveWindow ( IntPtr hWnd, int x, int y, int cx, int cy, bool repaint ) : bool
OpenEvent ( Int32 DesiredAccess, bool InheritHandle, string Name ) : Int32
OpenProcessToken ( IntPtr processHandle, uint desiredAccess, IntPtr &tokenHandle ) : bool
PostMessage ( IntPtr hWnd, uint callback, uint wParam, uint lParam ) : bool
RegisterClassEx ( WNDCLASSEX &pcWndClassEx ) : int
RegisterHotKey ( IntPtr hWnd, int id, KeyModifiers fsModifiers, System vk ) : bool
RegisterShellHook ( IntPtr hWnd, uint flags ) : bool
RegisterShellHookWindow ( IntPtr hWnd ) : bool
RegisterWindowMessage ( string msg ) : int
SHAppBarMessage ( int dwMessage, APPBARDATA &pData ) : uint
SendMessage ( IntPtr hwnd, int message, IntPtr wparam, IntPtr lparam ) : IntPtr
SendMessageTimeout ( IntPtr hWnd, uint messageId, uint wparam, uint lparam, uint timeoutFlags, uint timeout, uint &retval ) : uint
SetEvent ( Int32 Handle ) : Int32
SetShellWindow ( IntPtr hWnd ) : Int32
SetSuspendState ( bool hibernate, bool forceCritical, bool disableWakeEvent ) : bool
SetTaskmanWindow ( IntPtr hWnd ) : bool
SetWindowPos ( IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags ) : bool
SystemParametersInfo ( SPI uiAction, uint uiParam, IntPtr pvParam, SPIF fWinIni ) : bool
UnregisterClass ( string lpClassname, IntPtr hInstance ) : bool
UnregisterHotKey ( IntPtr hWnd, int id ) : bool

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

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

public static FindWindow ( string className ) : IntPtr
className string
Результат System.IntPtr

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

public static GetIconForWindow ( IntPtr HWnd ) : uint
HWnd System.IntPtr
Результат uint

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

public static GetWindowRectangle ( IntPtr windowHandle ) : RECT
windowHandle System.IntPtr
Результат RECT

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

Calls the logoff method on the Win32 API.
public static Logoff ( ) : void
Результат void

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

public static PostWindowsMessage ( IntPtr hWnd, uint callback, uint uid, uint messageId ) : void
hWnd System.IntPtr
callback uint
uid uint
messageId uint
Результат void

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

Calls the reboot method on the Win32 API.
public static Reboot ( ) : void
Результат void

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

Calls the shutdown method on the Win32 API.
public static Shutdown ( ) : void
Результат void

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

Calls the Sleep method on the Win32 Power Profile API.
public static Sleep ( ) : void
Результат void