RUSES
Would you like to react to this message? Create an account in a few clicks or log in to continue.
April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     

Calendar Calendar


[C++] speed up programs

3 posters

Go down

[C++] speed up programs Empty [C++] speed up programs

Post  John Fri Feb 24, 2012 11:31 am

ok so if u guys are using windows u can change the priority of a program


//to change program priority.
HANDLE hCurrentProcess = GetCurrentProcess();
^^^^
in the header area use this handle prototype



int main(){
//setting the program priority to speed up the program.
then at the top of main VVVV

SetPriorityClass(hCurrentProcess, HIGH_PRIORITY_CLASS);
John
John
Admin

Posts : 36
Join date : 2012-02-23
Age : 32

https://ruses.forumotion.co.uk

Back to top Go down

[C++] speed up programs Empty Re: [C++] speed up programs

Post  Alex Fri Feb 24, 2012 10:31 pm

Nice!

This should work in C as well
Alex
Alex

Posts : 67
Join date : 2012-02-23
Location : Come at me bro

Back to top Go down

[C++] speed up programs Empty Re: [C++] speed up programs

Post  Charlie Wed Feb 29, 2012 3:27 am

Thanks for this. Smile

Quick note for people: if you haven't already, you'll need to #include <Windows.h> for this to work.
Charlie
Charlie

Posts : 16
Join date : 2012-02-23

Back to top Go down

[C++] speed up programs Empty Re: [C++] speed up programs

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum