upon closing windows application - process continues

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a windows application that gets installed using a installer program.
(it has crystal which requires this)
when I run the application - everything works.
I exit the application and the dlls continue to run in task manager
processes....
how do i kill them ---- I need to 'update' the application using xcopy and
the system needs to be rebooted prior to the udate --- which won't work in my
environment.

thanks
 
Sandy,

If the process doesn't die that means you have working threads in the
process. You need to stop all threads in order Windows to remove the
process.
 
how do i find that out..
i have multiple projects in teh same solution - and have .exit for the main
application - why wouldn't that kill the threads?

Stoitcho Goutsev (100) said:
Sandy,

If the process doesn't die that means you have working threads in the
process. You need to stop all threads in order Windows to remove the
process.

--
HTH
Stoitcho Goutsev (100) [C# MVP]


Sandy Ryan said:
I have a windows application that gets installed using a installer program.
(it has crystal which requires this)
when I run the application - everything works.
I exit the application and the dlls continue to run in task manager
processes....
how do i kill them ---- I need to 'update' the application using xcopy and
the system needs to be rebooted prior to the udate --- which won't work in my
environment.

thanks
 
Threads will be killed only of they have their IsBackground property set to
true.
Anyways, Environment.Exit does kill all the running threads.

--

Stoitcho Goutsev (100) [C# MVP]


Sandy Ryan said:
how do i find that out..
i have multiple projects in teh same solution - and have .exit for the main
application - why wouldn't that kill the threads?

Stoitcho Goutsev (100) said:
Sandy,

If the process doesn't die that means you have working threads in the
process. You need to stop all threads in order Windows to remove the
process.

--
HTH
Stoitcho Goutsev (100) [C# MVP]


Sandy Ryan said:
I have a windows application that gets installed using a installer program.
(it has crystal which requires this)
when I run the application - everything works.
I exit the application and the dlls continue to run in task manager
processes....
how do i kill them ---- I need to 'update' the application using xcopy and
the system needs to be rebooted prior to the udate --- which won't
work in
my
environment.

thanks
 
well if environment.exit kills the threads - then something is still running
as the processess continue :-(


Stoitcho Goutsev (100) said:
Threads will be killed only of they have their IsBackground property set to
true.
Anyways, Environment.Exit does kill all the running threads.

--

Stoitcho Goutsev (100) [C# MVP]


Sandy Ryan said:
how do i find that out..
i have multiple projects in teh same solution - and have .exit for the main
application - why wouldn't that kill the threads?

Stoitcho Goutsev (100) said:
Sandy,

If the process doesn't die that means you have working threads in the
process. You need to stop all threads in order Windows to remove the
process.

--
HTH
Stoitcho Goutsev (100) [C# MVP]


I have a windows application that gets installed using a installer
program.
(it has crystal which requires this)
when I run the application - everything works.
I exit the application and the dlls continue to run in task manager
processes....
how do i kill them ---- I need to 'update' the application using xcopy and
the system needs to be rebooted prior to the udate --- which won't work in
my
environment.

thanks
 
Can you use Spy++ tool to see what threads are running in the process?
It is really strange.

--

Stoitcho Goutsev (100) [C# MVP]


Sandy Ryan said:
well if environment.exit kills the threads - then something is still running
as the processess continue :-(


Stoitcho Goutsev (100) said:
Threads will be killed only of they have their IsBackground property set to
true.
Anyways, Environment.Exit does kill all the running threads.

--

Stoitcho Goutsev (100) [C# MVP]


Sandy Ryan said:
how do i find that out..
i have multiple projects in teh same solution - and have .exit for the main
application - why wouldn't that kill the threads?

:

Sandy,

If the process doesn't die that means you have working threads in the
process. You need to stop all threads in order Windows to remove the
process.

--
HTH
Stoitcho Goutsev (100) [C# MVP]


I have a windows application that gets installed using a installer
program.
(it has crystal which requires this)
when I run the application - everything works.
I exit the application and the dlls continue to run in task manager
processes....
how do i kill them ---- I need to 'update' the application using
xcopy
and
the system needs to be rebooted prior to the udate --- which won't work in
my
environment.

thanks
 
BTW, are you sure you call Environmen.Exit rather than Application.Exit?
Because the latter won't terminate any non background threads except the
main UI thread.

--

Stoitcho Goutsev (100) [C# MVP]


Stoitcho Goutsev (100) said:
Can you use Spy++ tool to see what threads are running in the process?
It is really strange.

--

Stoitcho Goutsev (100) [C# MVP]


Sandy Ryan said:
well if environment.exit kills the threads - then something is still running
as the processess continue :-(
set
to
true.
Anyways, Environment.Exit does kill all the running threads.

--

Stoitcho Goutsev (100) [C# MVP]


how do i find that out..
i have multiple projects in teh same solution - and have .exit for the
main
application - why wouldn't that kill the threads?

:

Sandy,

If the process doesn't die that means you have working threads in the
process. You need to stop all threads in order Windows to remove the
process.

--
HTH
Stoitcho Goutsev (100) [C# MVP]


I have a windows application that gets installed using a installer
program.
(it has crystal which requires this)
when I run the application - everything works.
I exit the application and the dlls continue to run in task manager
processes....
how do i kill them ---- I need to 'update' the application using xcopy
and
the system needs to be rebooted prior to the udate --- which won't
work in
my
environment.

thanks
 
Back
Top