Results 1 to 6 of 6

Thread: help needed in ExitWindowsEx

  1. #1
    manishmenghani
    Guest
    Hey
    Is there anyone who has usd this API to shutdown the windows . while using this its not shutting down the windows properly . its just refreshing the desktop

    ExitWindowsEx(4,0)

    any idea why this happening & how to resolve that


    thanks in advance

  2. #2
    Megatron
    Guest
    Or is an operator. Just like And, + (add), -(minus), etc.

    Just copy his code and paste it into your Form (with a Button).

  3. #3
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    Or Operator In API Is Just like the AND operator in VB

  4. #4
    Tygur
    Guest
    shragel,

    Or Operator In API Is Just like the AND operator in VB
    How do you figure? I don't understand that statement..

  5. #5
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    You use OR as a boolean operator, or to set bits.

    In this case

    EWX_FORCE Or EWX_SHUTDOWN
    = 1 OR 4

    (Bitwise comparison in binary)

    001
    100
    -----
    101 = 5 decimal

    The result of using OR in this case is to set the bits to force a shutdown.

    What would happen if you used AND instead of OR?
    001
    100
    -----
    000 = 0

    Then nothing would happen.

  6. #6
    QuaffAPint
    Guest
    I'm glad I put that Math degree to good use....


    (That sound you hear is my hand smacking my forehead...)


    Thanks all for the awakening of some of my brain cells...

    -QuaffAPint

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