Home
Tutorials
Code Snippets
Code Samples
Downloads
Links

The Blog
Our Projects
About
Contact

::Add RageStorm to Favorites!::

The Blog | Our Projects | Guest Book | About | Contact

 
Code Snippet - Process Priority
Author:Arkon
Category:Win32API
File Size:347 Bytes
Uploaded at:27-Nov-02 07:52:28 pm
Description:
  Changing process' priority so it runs faster...Usually not recommended but know it's possible.
  
// This will haste your process, use when you need SPEEEED for algorithms etc..!

// Get HWND process ID
DWORD pID = 0;
GetWindowThreadProcessId(hWnd, &pID);

HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pID);
SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS); // This is the highest possible priority!
CloseHandle(hProcess);
User Contributed Comments(1)
 [1] Numen | 2006-09-28 06:56:15

It's great! I also want to know how I can change a running process's priority using DOS command?
NOTE:
Comments that will hurt anyone in any way will be deleted.
Don't ask for features, advertise or curse.
If you want to leave a message to the author use the contacts,
if you have any question in relation to your comments please use the forum.
Comments which violate any of these requests will be deleted without further
notice. Use the comment system decently.

Post your comment:
Name:
email:
Comment:
::Top 5 Tutorials::
Embedded Python[117069]
2D Rotated Rectangles Collision Detection[88994]
Keyboard Hook[77338]
UDP[65887]
HTTP Proxy[41225]

::Top 5 Samples::
2D ColDet Rotated Rectangles[11562]
PS2 Mouse Driver[6960]
Wave Format Player[5793]
Reading FAT12[5621]
CodeGuru[5361]


All rights reserved to RageStorm © 2009