DUA - And Close Message
WinXPTalk.com Forum Index WinXPTalk.com
Forums for Windows XP users.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winxptalk.com
DUA - And Close Message

 
Post new topic   Reply to topic    WinXPTalk.com Forum Index -> Embedded System
Author Message
Richard
Guest





Posted: Wed Jan 12, 2005 5:37 am    Post subject: DUA - And Close Message Reply with quote

Hello,
May not be the right place but hopefully this is an easy one to answer.

I have a small program (KillProg) that DUA runs to close the custom shell,
and to close my application so I can copy new files over. It simply
sendsmessage with a wmClose parameter to the proper form handle.

It worked fine, however, now, I had to add a Form Close Query on the custom
shell, so when a user tries to close the shell, it pops up a Messagebox
asking for confirmation, if yes, then the the shell closes.

Since I added this msgbox, my KillProg causes the input box to popup asking
for confirmation and never shutsdown without user input. Is there a way I
can send a message to Force the shell to close? Something besides wmClose?

When the application sends a shutdown or reboot command, the shell still
pops the message, the system still forces the shell to close and a reboot
occurs, which is as intended.

Thanks,
Richard
Back to top
Slobodan Brcin (eMVP)
Guest





Posted: Wed Jan 12, 2005 6:03 am    Post subject: Re: DUA - And Close Message Reply with quote

Hi Richard,

Use API functions for manipulating jobs. You can assign process and all children it create to job object. And you can also tell it
when job is closed that everything in its container is killed on sight :-)

CreateJobObject
SetInformationJobObject
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE

I think that this will be enough for you to keep you going.

Regards,
Slobodan


"Richard" <rwskinnernospam@awesomenet-period-net> wrote in message news:ui7kV8D%23EHA.2596@tk2msftngp13.phx.gbl...
Quote:
Hello,
May not be the right place but hopefully this is an easy one to answer.

I have a small program (KillProg) that DUA runs to close the custom shell,
and to close my application so I can copy new files over. It simply
sendsmessage with a wmClose parameter to the proper form handle.

It worked fine, however, now, I had to add a Form Close Query on the custom
shell, so when a user tries to close the shell, it pops up a Messagebox
asking for confirmation, if yes, then the the shell closes.

Since I added this msgbox, my KillProg causes the input box to popup asking
for confirmation and never shutsdown without user input. Is there a way I
can send a message to Force the shell to close? Something besides wmClose?

When the application sends a shutdown or reboot command, the shell still
pops the message, the system still forces the shell to close and a reboot
occurs, which is as intended.

Thanks,
Richard

Back to top
KM
Guest





Posted: Wed Jan 12, 2005 6:17 am    Post subject: Re: DUA - And Close Message Reply with quote

Richard,

How about sending WM_QUIT to all the threads of the running apps? (I guess you may only have one thread)

--
Regards,
KM, BSquare Corp.

PS. You forgot to mention the language you are implementing your shell app in. Delphi?


Quote:
Hello,
May not be the right place but hopefully this is an easy one to answer.

I have a small program (KillProg) that DUA runs to close the custom shell,
and to close my application so I can copy new files over. It simply
sendsmessage with a wmClose parameter to the proper form handle.

It worked fine, however, now, I had to add a Form Close Query on the custom
shell, so when a user tries to close the shell, it pops up a Messagebox
asking for confirmation, if yes, then the the shell closes.

Since I added this msgbox, my KillProg causes the input box to popup asking
for confirmation and never shutsdown without user input. Is there a way I
can send a message to Force the shell to close? Something besides wmClose?

When the application sends a shutdown or reboot command, the shell still
pops the message, the system still forces the shell to close and a reboot
occurs, which is as intended.

Thanks,
Richard
Back to top
 
Post new topic   Reply to topic    WinXPTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Office Forums Access Forums Windows Server Exchange Server Help
New Topics Powered by phpBB