C# Class MGDF.GamesManager.Model.UACControl

Mostra file Open project: mrsharpoblunto/MGDF

Public Methods

Method Description
AddShieldToButton ( Button b ) : void

Add a shield icon to a button

IsAdmin ( ) : bool

Checks if the process is elevated

IsUacEnabled ( ) : bool
IsVistaOrHigher ( ) : bool
RestartElevated ( string arguments ) : void

Restart the current process with administrator credentials

Private Methods

Method Description
GetTokenInformation ( IntPtr TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, IntPtr TokenInformation, uint TokenInformationLength, uint &ReturnLength ) : bool
OpenProcessToken ( IntPtr ProcessHandle, UInt32 DesiredAccess, IntPtr &TokenHandle ) : bool
SendMessage ( IntPtr hWnd, UInt32 msg, UInt32 wParam, UInt32 lParam ) : UInt32

Method Details

AddShieldToButton() public static method

Add a shield icon to a button
public static AddShieldToButton ( Button b ) : void
b System.Windows.Forms.Button The button
return void

IsAdmin() public static method

Checks if the process is elevated
public static IsAdmin ( ) : bool
return bool

IsUacEnabled() public static method

public static IsUacEnabled ( ) : bool
return bool

IsVistaOrHigher() public static method

public static IsVistaOrHigher ( ) : bool
return bool

RestartElevated() public static method

Restart the current process with administrator credentials
public static RestartElevated ( string arguments ) : void
arguments string
return void