Hi

If you just want to reduce the priority why not run the services 
processing in a thread created with a low priority, then you don't have 
to worry about Windows security etc.  However I don't know if this would 
achieve what Vikas wants.

Rob



Phil Scadden wrote:
>> I am creating a window service using delphi 5. I need some help is getting 
>> the CPU memory usage of the machine so that my service runs when CPU usage 
>> is low. Is there any way to find out the CPU usage. Is there soem registry 
>> key or soemthing. I am not sure actually.
>>
>>   
>>     
> Strikes me that the best way to do this is to reduce the priority of 
> service process instead. A process with appropriate privilege can get 
> the id of process and then reduce the priority. I dont know if a process 
> can do this to itself (I have my doubts) but perhaps your service runs 
> within a context where another process can do this? As far as I know you 
> cannot change priority through the SCM functions.
>   
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

Reply via email to