C# 클래스 BelhardTraining.LessonMultithreading.ProccessIntegrityLevelHelper

파일 보기 프로젝트 열기: bazile/Training

공개 메소드들

메소드 설명
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