Urgent Thread active problem.

I have one MFC application. Some time on one Win 2000 Sp2 machine showing one problem.
Problem is after exiting my app some Treads remaining active.The process is not active on taskmanager but pslist showing the process as active. Any idea ??????
LVL 3
job_sAsked:
Who is Participating?
 
NetminderConnect With a Mentor Commented:
PAQed, with points refunded (200)

Netminder
EE Admin
0
 
Roshan DavisCommented:
MSDN Says

SYMPTOMS
A process continues to exist after a call to the TerminateProcess function on that process has successfully returned.

CAUSE
When there is a request to terminate a process through the TerminateProcess function, Windows stops all the user-mode activity of the target process. However, the target process cannot actually exit until all kernel-mode activity specific to that process is complete. This means that the target process continues to exist until all of its threads have left kernel-mode and all pending IO has been canceled.

This situation occurs as the result of a device driver not releasing a thread or not canceling IO. The process continues to exist until the IO completes and all threads in the process are released from kernel mode.

GOOD LUCK
0
 
job_sAuthor Commented:
Do u have any idea that how much time it may take to complete the opertaion like pending IO ????
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Roshan DavisCommented:
If u r not closing a kernel object in user mode not properly, this may cause problems....


Roshmon
0
 
DanRollinsCommented:
Sometimes you can call CancelIO( handle ).  It is not availble on Win 95.

-- Dan
0
 
job_sAuthor Commented:
hi frieds,

    Thanks for Ur responses.I have find out the problem myself .

job_s
0
 
job_sAuthor Commented:
I have find out the solution my self.
The problem was because of teminal services running on that system.When another terminal user runs that APP.It will be shown as a proces on the pslist.

0
 
DanRollinsCommented:
Good info.  I suggest that you post to Community Support and ask to have your points refunded since you found the answer yourself.  

I recommend that this NOT be deleted, but rather saved as a PAQ.

-- Dan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.