DUA - And Close Message

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

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
 
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,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DUA System Account 9
DUA - message box? 2
DUA 5
Launch command-line utility from DUA without showing a CMD.EXE win 1
EWF/DUA help needed 18
Using DUA 5
closing shell please help :( 1
Dua with Ewf 3

Back
Top