public void SetExtendedLimitInformation(JobObjectExtendedLimitInformation limit) { int length = Marshal.SizeOf(typeof(JobObjectExtendedLimitInformation)); IntPtr extendedInfoPtr = Marshal.AllocHGlobal(length); Marshal.StructureToPtr(limit, extendedInfoPtr, false); this.SetInformation <JobObjectExtendedLimitInformation>(JobObjectInfoType.ExtendedLimitInformation, extendedInfoPtr); }
public void SetBasicLimitInformation(JobObjectBasicLimitInformation limit) { JobObjectExtendedLimitInformation extendedInfo = new JobObjectExtendedLimitInformation { BasicLimitInformation = limit }; this.SetExtendedLimitInformation(extendedInfo); }