Results 1 to 12 of 12

Thread: completely and totally stumped

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352

    Lightbulb

    I am trying to kill an app running off a cd in Windows NT. I have had no success with sending wm_close or wm_terminate; I have been unable to use other API calls to any success. Can anyone find a method that works and describe it in great detail? Thank you very much for your time.

    Joe

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Try wm_kill and wm_destroy. This isn't a joke.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352

    Question

    Should I use it with the sendmessage API?

  4. #4
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    Yes. SendMessage asks the app to close. If that doesn't work either, you can kill the thread forcefully, but any prompts (save, for example) won't be generated...it'll be like if you hit ctrl-alt-delt
    Wade

  5. #5
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Hitting ctrl-alt-del doesn't alway's helps, because you can hide your proggies from the ctrl-alt-del-list.

  6. #6
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    That was just an analogy...not really using ctrl-alt-del. I had an app that wouldn't respond to Sendmessage, so I killed the entire thread (thru code)...it works but you'd lose any close-out processing from the app. Hopefully, the constants you gave him will work.
    Wade

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352
    How do you induce a ctrl alt delete type close then. Everytime I have tried, it hasn't worked. Could you describe the parameters in great detail as well? thanx

  8. #8
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    When you press ctr-alt-del and terminate an app, Windows sends these messages to the app you selected:
    WM_Close
    WM_Destroy
    WM_NCDestroy

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352
    are you sure it works in NT?

  10. #10
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    No, I use win98 SE.

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352
    Thank you very much. It almost works but not quite. I still prompts if you wish to close the program. Do you know how to avoid that? thanx again

  12. #12
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    SendMessage works in NT too...you can try SendMessage with something like Notepad and it'll work, but not all apps respond to it because SendMessage only asks the app to close. Let me just clear this up though -- I only used the ctrl-alt-delt description as an analogy to indicate that any close-out processing in the app would be lost. I didn't say to actually use Ctrl-Alt-Delt.

    What you can do if SendMessage doesn't work is kill the thread that the app is running in. It uses APIs to enumerate and kill the thread which Aaron Young did previously and reiterated in http://forums.vb-world.net/showthrea...threadid=15739.

    [Edited by WadeD on 08-15-2000 at 04:52 PM]
    Wade

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width