Pause COM object

O

OBINT

Hi

I am using one API to do some process for me, but unfortunately API dont
have a option of pause the process and resume it back. How can i do this
using C#

API take more then 2 hours in processing and takes 100% CPU usage, I want a
option so that i can pause the COM to work and resume when required.

Thanks in advance.
 
N

Nicholas Paldino [.NET/C# MVP]

OBINT,

If the object doesn't expose this functionality, then you really don't
have a choice.

What you might want to do is run the object in another thread and set
the Priority property to a lower value. This will increase processing time,
but should make your system more responsive.

Additionally, you could have a separate process run the COM object, and
then set the priority of the process itself to be low.

The best thing to do in this situation would be to re-engineer the COM
object to have a "pause" method, or to make it more efficient/less
consuming. You can do this either in .NET or in unmanaged code, but that
requires the most work. It might also be the best solution.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top