Your best source of information and news about vista, secrets and microsoft on the internet

Vista ARTICLES TOP 50 Spyware Virus Vista SOFT Vista HELP

autostart

You are currently browsing the articles from MS Windows Vista Compatible Software matching the category autostart.

SetThreadPriority, Vista, and Autostart Locations

I ran across a post on the Vista Compatibility Team Blog entitled “SetThreadPriority from Run key” that discusses a change in Vista whereby calling SetThreadPriority from an application launched from the Startup folder and the “Run” key in the registry will not cause the thread’s priority to be increased.

Wanting to verify and play around with this, I wrote a simple program that called SetThreadPriority to set the priority of the thread to THREAD_PRIORITY_HIGHEST. The program then immediately called GetThreadPriority to determine if the call to SetThreadPriority had any effect. Next, in a loop, the program then called SetThreadPriority / GetThreadPriority until either an error was encountered, or GetThreadPriority returned the expected priority. The program logged before and after each call to SetThreadPriority / GetThreadPriority the time, the action, and the either the parameters or the return value.

I set the program to be launched automatically by placing a shortcut in the “Startup” folder, and rebooted. Once the system came back up, I waited a bit and then examined the log. The first call to SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_HIGHEST ); returned TRUE. The first call to GetThreadPriority( GetCurrentThread() ); returned 0 indicating THREAD_PRIORITY_NORMAL. In other

Click to continue reading "SetThreadPriority, Vista, and Autostart Locations"

Written by «/\/\Ø|ö±ò\/»®© on November 18th, 2007 with no comments.
Read more articles on threads and GetThreadPriority and priorities and autostart and run and startup and otherSoftware and SetThreadPriority and vista.