■ SetInformationJobObject API 함수를 선언하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
using System; using System.Runtime.InteropServices; #region 작업 객체 정보 설정하기 - SetInformationJobObject(jobHandle, jobObjectInformationType, jobObjectInformationHandle, jobObjectInformationLength) /// <summary> /// 작업 객체 정보 설정하기 /// </summary> /// <param name="jobHandle">작업 핸들</param> /// <param name="jobObjectInformationType">작업 객체 정보 타입</param> /// <param name="jobObjectInformationHandle">작업 객체 정보 핸들</param> /// <param name="jobObjectInformationLength">작업 객체 정보 길이</param> /// <returns>처리 결과</returns> [DllImport("kernel32")] private static extern bool SetInformationJobObject ( IntPtr jobHandle, JobObjectInformationType jobObjectInformationType, IntPtr jobObjectInformationHandle, uint jobObjectInformationLength ); #endregion /// <summary> /// 작업 객체 정보 타입 /// </summary> public enum JobObjectInformationType { /// <summary> /// Associate Completion Port Information /// </summary> AssociateCompletionPortInformation = 7, /// <summary> /// Basic Limit Information /// </summary> BasicLimitInformation = 2, /// <summary> /// Basic UI Restrictions /// </summary> BasicUIRestrictions = 4, /// <summary> /// End Of Job Time Information /// </summary> EndOfJobTimeInformation = 6, /// <summary> /// Extended Limit Information /// </summary> ExtendedLimitInformation = 9, /// <summary> /// Security Limit Information /// </summary> SecurityLimitInformation = 5, /// <summary> /// Group Information /// </summary> GroupInformation = 11 } |