Re: Relationship between Application.Exit() and AppDomain
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Tue, 8 Apr 2008 09:09:20 -0500
Willy Denoyette [MVP] wrote:
"Barry Kelly" <barry.j.kelly@xxxxxxxxx> wrote in message
news:4djkv39krr67nr7f3fjttfi86581in3gpm@xxxxxxxxxx
Willy Denoyette [MVP] wrote:
"Barry Kelly" <barry.j.kelly@xxxxxxxxx> wrote:
Willy Denoyette [MVP] wrote:
Application.Exit() is a Forms API,
That is true.
Well here you are calling PostQuitMessage which doesn't really do
what it's
supposed to do
PostQuitMessage posts WM_QUIT to the current thread's message queue.
This is no different in a WPF application than in any other Windows
application. WM_QUIT causes GetMessage to return 0.
Well, It doesn't post a WM_QUIT message to the UI's thread queue when
run on Vista (both RTM and SP1), of course it does post WM_QUIT when
called in a Windows.Forms based application (or any non managed
windows app.).
Barry has this one exactly right. PostQuitMessage is a Win32 function, it
couldn't care less whether your app is WPF or WinForms or MFC or whatever.
It posts WM_QUIT and returns.
I don't know how you can get any clearer than this:
http://msdn2.microsoft.com/en-us/library/ms644945(VS.85).aspx
"The PostQuitMessage function posts a WM_QUIT message to the thread's
message queue and returns immediately; the function simply indicates to the
system that the thread is requesting to quit at some time in the future."
.
- Follow-Ups:
- Re: Relationship between Application.Exit() and AppDomain
- From: Willy Denoyette [MVP]
- Re: Relationship between Application.Exit() and AppDomain
- References:
- Relationship between Application.Exit() and AppDomain
- From: Sunny S
- Re: Relationship between Application.Exit() and AppDomain
- From: Willy Denoyette [MVP]
- Re: Relationship between Application.Exit() and AppDomain
- From: Barry Kelly
- Re: Relationship between Application.Exit() and AppDomain
- From: Willy Denoyette [MVP]
- Re: Relationship between Application.Exit() and AppDomain
- From: Barry Kelly
- Re: Relationship between Application.Exit() and AppDomain
- From: Willy Denoyette [MVP]
- Relationship between Application.Exit() and AppDomain
- Prev by Date: .NET Runtime version 2.0.50727.832 - Fatal Execution Engine Error
- Next by Date: Re: Relationship between Application.Exit() and AppDomain
- Previous by thread: Re: Relationship between Application.Exit() and AppDomain
- Next by thread: Re: Relationship between Application.Exit() and AppDomain
- Index(es):