Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
ThatsAlok2-Dec-05 0:55
ThatsAlok2-Dec-05 0:55 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
PanB2-Dec-05 1:01
PanB2-Dec-05 1:01 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
ThatsAlok2-Dec-05 1:12
ThatsAlok2-Dec-05 1:12 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
Blake Miller2-Dec-05 6:18
Blake Miller2-Dec-05 6:18 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
ThatsAlok4-Dec-05 17:55
ThatsAlok4-Dec-05 17:55 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
Blake Miller5-Dec-05 6:01
Blake Miller5-Dec-05 6:01 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
ThatsAlok5-Dec-05 17:34
ThatsAlok5-Dec-05 17:34 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
ThatsAlok5-Dec-05 21:11
ThatsAlok5-Dec-05 21:11 
Blake Miller wrote:
It is well-documented in the literature that FindWindow sends a WM_GETTEXT to all the windows it searches. If you encounter a window that has a stalled message loop, then your application will hang as well. And then if ANOTHER program does FindWindow()


Sorry to Trouble you again Sir!. I am just clearing my doubt.

Here is entry of author of Blogs OldNewthing :-
"
If you are trying to GetWindowText() from a window in another process, then GetWindowText() will use the string from the "special place" and not send a message.
"

What MSDN states: -
In Remark Section of FindWindow :-
"
FindWindow calls the GetWindowText function to retrieve the window name for comparison. For a description of a potential problem that can arise, see the Remarks for GetWindowText.
"

Yes, Sir you 100% right that GetWindowText internally call WM_GETTEXT (i.e. FindWindow api call WM_GETTEXT), but with little exception, here what the remark section tells about that: -

"
If the target window is owned by another process and has a caption, GetWindowText retrieves the window caption text. If the window does not have a caption, the return value is a null string. This behavior is by design. It allows applications to call GetWindowText without hanging if the process that owns the target window is hung
"

But Sir, As Usual, you are Right, it will no good to use the FindWindow method in the scenario where we searching for the window which is hung, then GetWindowText will return NULL String( as written in Documentation), that can make Monitoring application Quit... When the Monitored application is still running. I will Take care of this in future!


"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
Blake Miller6-Dec-05 8:39
Blake Miller6-Dec-05 8:39 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
ThatsAlok6-Dec-05 17:08
ThatsAlok6-Dec-05 17:08 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
ThatsAlok6-Dec-05 18:51
ThatsAlok6-Dec-05 18:51 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
Eytukan2-Dec-05 2:09
Eytukan2-Dec-05 2:09 
GeneralRe: From TaskManager - Do not want anyone end task an App./Pross Pin
ThatsAlok6-Dec-05 18:55
ThatsAlok6-Dec-05 18:55 
AnswerRe: From TaskManager - Do not want anyone end task an App./Pross Pin
Sheng Jiang 蒋晟3-Dec-05 8:55
Sheng Jiang 蒋晟3-Dec-05 8:55 
AnswerRe: From TaskManager - Do not want anyone end task an App./Pross Pin
PanB7-Dec-05 17:54
PanB7-Dec-05 17:54 
QuestionAccess 2000 Ole Integration Pin
pabloqnk1-Dec-05 21:13
pabloqnk1-Dec-05 21:13 
AnswerRe: Access 2000 Ole Integration Pin
Branislav2-Dec-05 23:54
Branislav2-Dec-05 23:54 
Questionunicode problem Pin
QuickDeveloper1-Dec-05 20:54
QuickDeveloper1-Dec-05 20:54 
AnswerRe: unicode problem Pin
sunit51-Dec-05 21:32
sunit51-Dec-05 21:32 
AnswerRe: unicode problem Pin
Taka Muraoka1-Dec-05 22:04
Taka Muraoka1-Dec-05 22:04 
AnswerRe: unicode problem Pin
ThatsAlok6-Dec-05 19:03
ThatsAlok6-Dec-05 19:03 
Questionlist class from STL Pin
SanjaySMK1-Dec-05 20:38
SanjaySMK1-Dec-05 20:38 
AnswerRe: list class from STL Pin
Cedric Moonen1-Dec-05 20:53
Cedric Moonen1-Dec-05 20:53 
GeneralRe: list class from STL Pin
John M. Drescher1-Dec-05 20:57
John M. Drescher1-Dec-05 20:57 
AnswerRe: list class from STL Pin
SilentSilent1-Dec-05 23:59
SilentSilent1-Dec-05 23:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.