April 2019
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     

Calendar Calendar


[C++] speed up programs

Go down

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

Post  John on 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 : 27

View user profile http://ruses.forumotion.co.uk

Back to top Go down

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

Post  Alex on 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

View user profile

Back to top Go down

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

Post  Charlie on 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

View user profile

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

- Similar topics

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