TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jr Carreiro
NA
10
1.1k
Working with CPU rate limits with C#
Jan 19 2021 11:19 AM
I'm trying to reproduce some codes that I have in C++, but when I try to work with CPU control I can't reproduce them without the use [DLL Imports], but I would like to do everything using C# native code, without the need to do any references or imports WIN32 API.
Below the code that I tried to reproduce:
JOBOBJECT_CPU_RATE_CONTROL_INFORMATION info;
// CPU rate control
info.CpuRate = atoi(argv[2]) * 100;
info.ControlFlags = JOB_OBJECT_CPU_RATE_CONTROL_ENABLE | JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP;
if (!SetInformationJobObject(hJob, JobObjectCpuRateControlInformation, &info, sizeof(info)))
return Error("Failed in setting job information");
Reply
Answers (
1
)
How to view related data from API in WebApp.
How to show selected image in asp. Net without postback.