Beispiel #1
0
        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);
        }
Beispiel #2
0
        public void SetBasicLimitInformation(JobObjectBasicLimitInformation limit)
        {
            JobObjectExtendedLimitInformation extendedInfo = new JobObjectExtendedLimitInformation
            {
                BasicLimitInformation
                    = limit
            };

            this.SetExtendedLimitInformation(extendedInfo);
        }