From: a on
When a process has been paused with SuspendThread...

http://msdn.microsoft.com/en-us/library/ms686345%28VS.85%29.aspx

....is there a way for my app to know if the process is paused?


From: a on
"a" <b(a)invalid.com> wrote in message news:4c39fcd7$1(a)dnews.tpgi.com.au...
> When a process has been paused with SuspendThread...
>
> http://msdn.microsoft.com/en-us/library/ms686345%28VS.85%29.aspx
>
> ...is there a way for my app to know if the process is paused?


Just to clarify: I don't mean my app is pausing the thread, but I do
want my app to take any given PID and see if it's already paused, or
if the threads in it are running.


From: Carlos on

in the same page you can read

DWORD WINAPI SuspendThread(
__in HANDLE hThread );

"If the function succeeds, the return value is the thread's previous suspend
count; otherwise, it is (DWORD) -1."

"Each thread has a suspend count (with a maximum value of
MAXIMUM_SUSPEND_COUNT). If the suspend count is greater than zero, the
thread is suspended; otherwise, the thread is not suspended and is eligible
for execution"

it seems to be simple but, now I can't test all these affairs,

hope this helps,
Carlos.


"a" <b(a)invalid.com> escribi� en el mensaje
news:4c39fd2f$1(a)dnews.tpgi.com.au...
> "a" <b(a)invalid.com> wrote in message news:4c39fcd7$1(a)dnews.tpgi.com.au...
>> When a process has been paused with SuspendThread...
>>
>> http://msdn.microsoft.com/en-us/library/ms686345%28VS.85%29.aspx
>>
>> ...is there a way for my app to know if the process is paused?
>
>
> Just to clarify: I don't mean my app is pausing the thread, but I do
> want my app to take any given PID and see if it's already paused, or
> if the threads in it are running.
>
>


From: a on
"Carlos" <no(a)mail.please> wrote in message news:i1qkdo$7tp$1(a)speranza.aioe.org...
>
> in the same page you can read
>
> DWORD WINAPI SuspendThread(
> __in HANDLE hThread );
>
> "If the function succeeds, the return value is the thread's previous suspend count; otherwise, it is (DWORD) -1."
>
> "Each thread has a suspend count (with a maximum value of MAXIMUM_SUSPEND_COUNT). If the suspend count is greater than zero, the
> thread is suspended; otherwise, the thread is not suspended and is eligible for execution"
>
> it seems to be simple but, now I can't test all these affairs,

I know that it keeps a count, but I don't see how to check that count without
actually pausing or resuming the thread to do so? Which means if the thread
is paused, I'll be unpausing it, and vice versa. Not a good solution.