C# Класс BelhardTraining.LessonMultithreading.ProccessIntegrityLevelHelper

Показать файл Открыть проект

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

Метод Описание
CreateLowIntegrityProcess ( string commandLine ) : void

The function launches an application at low integrity level.

To start a low-integrity process, 1) Duplicate the handle of the current process, which is at medium integrity level. 2) Use SetTokenInformation to set the integrity level in the access token to Low. 3) Use CreateProcessAsUser to create a new process using the handle to the low integrity access token.

GetCurrentProcessIntegrityLevel ( ) : IntegrityLevel
GetProcessIntegrityLevel ( IntPtr processHandle ) : IntegrityLevel

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

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

The function launches an application at low integrity level.
To start a low-integrity process, 1) Duplicate the handle of the current process, which is at medium integrity level. 2) Use SetTokenInformation to set the integrity level in the access token to Low. 3) Use CreateProcessAsUser to create a new process using the handle to the low integrity access token.
public static CreateLowIntegrityProcess ( string commandLine ) : void
commandLine string /// The command line to be executed. The maximum length of this string is 32K /// characters. ///
Результат void

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

public static GetCurrentProcessIntegrityLevel ( ) : IntegrityLevel
Результат IntegrityLevel

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

public static GetProcessIntegrityLevel ( IntPtr processHandle ) : IntegrityLevel
processHandle System.IntPtr
Результат IntegrityLevel