>Would putting DOEVENTS in the COM component have the same effect?
It might but it will depend on where the problem is. If the problem is that requerying a view takes too long for example, then DOEVENTS will not address this.
On the other side, using the Win API that I mentioned will ensure that the OS watches the VFP COM component and won't let it take 100% of the processor ever.
I should warn you that when I used the Win API function I did it to prevent another VFP EXE from taking 100% of the processor. I haven't tested this with a VFP COM component. In theory it should work since you assign priority at the process level (not the app level.) But I am not proficient with all these little nuances :)
>
>>Evan, inside your COM component you can make a call to the windows API to mark the process as low priority. This will prevent the COM component from using 100% of the processor.
>>
>>Here is the documentation for API function to changes the priority:
>>
http://www.news2news.com/vfp/?example=218&function=350>>
>>You can probably test this before you code it by setting the priority of the COM component to low with the Windows Task Manager and see how it behaves.
>>
>>>Hi folks.
>>>
>>>I have a few reports that are in a COM EXE. I call these from an ASP.NET page and they can take anywhere from 1 to 9 minutes to complete. When the COM component is called it uses the server CPU almost to 100% and doesn't allow other request to the webserver to be served at all. Rick had warned me of this.
>>>
>>>Can I throttle back the process or somehow force the process to backoff when another request comes in?
Hector Correa