C# Class MGDF.GamesManager.Model.UACControl

Afficher le fichier Open project: mrsharpoblunto/MGDF

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

IsAdmin() public static méthode

Checks if the process is elevated
public static IsAdmin ( ) : bool
Résultat bool

IsUacEnabled() public static méthode

public static IsUacEnabled ( ) : bool
Résultat bool

IsVistaOrHigher() public static méthode

public static IsVistaOrHigher ( ) : bool
Résultat bool

RestartElevated() public static méthode

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