>How can I get the hProcess of a FoxPro running exe?
>
If you're talking about the current execution context, GetCurrentProcess() should work - otherwise, you have to search the set of running processes to find the ProcessID and use OpenProcess() to retrieve a handle with the needed privileges.
>I need the program to reset its own priority.
>
If you do not understand the consequences and mechanisms of adjusting the priority of a process you are exceedingly likely to hurt yourself. I'll lay very heavy odds that since you don't know about GetCurrentProcess() you are odds on to mangle Windows a few times. Do yourself a favor; try launching the unzip process via CreateProcess() and use the dwCreationFlags value to adjust the priority when you start the process - see the MSDN Library entry on CreateProcess, and look in detail at the dwCreationFlags parameter values for the MSDN Library entry on CreateProcess(). Let the parent process set it.
>Background - we have several processes running on a Web Server.
>One of them unzips new files as they are uploaded
>- it kinda brings the machine to its knees
>- so we would like to set it to a low priority.
>
>Thanks,
>Dan