>>Task Manager does not show processors separately. I think it shows total cpu usage 100%. How I can look to processors separately ?
>
>View/CPU History/One graph per CPU.
>
>>I have the same problem with single processor W2K terminal server.
>>Is it possible to solve this by using windows API SetPriorityClass() to decrease
>>long-computing vfp program priority or is there a better solution ?
>
>You can do the same thing by right-clicking on the process in the Processes tab of the task manager. Don't know if it'll help, but it doesn't take much to try.
My idea is to decrease priority before long calculaton and restore it
after end of long calculation.
Will this program do this ?
declare INTEGER SetPriorityClass IN WIN32API ;
INTEGER ProcessHandle, INTEGER dwPriorityClass
declare INTEGER GetCurrentProcess IN WIN32API
IF SetPriorityClass(GetCurrentProcess(), 0x40)=0
MESSAGEBOX( 'Error')
ENDIF
DECLARE INTEGER SetThreadPriority IN KERNEL32.DLL ;
INTEGER hThread, ;
INTEGER nPriority
DECLARE INTEGER GetCurrentThread in KERNEL32.DLL
THREAD_PRIORITY_NORMAL = 0
THREAD_PRIORITY_BELOW_NORMAL = -1
THREAD_PRIORITY_LOWEST = -2
IF SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_LOWEST) = 0
MESSAGEBOX('error')
ENDIF
Andrus