Announcement

Collapse
No announcement yet.

Why do these two code bits act differently?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why do these two code bits act differently?

    From JR includes:

    #define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1)
    %INVALID_HANDLE_VALUE = &HFFFFFFFF???


    Why don't these two IF do the same thing?

    Code:
        IF SEARCH_HANDLE = %INVALID_HANDLE_VALUE THEN
         MSGBOX "= INVALID_HANDLE_VALUE"
        END IF
    
        IF SEARCH_HANDLE <> %INVALID_HANDLE_VALUE THEN
         MSGBOX "<> INVALID_HANDLE_VALUE"
        END IF

  • #2
    "=" is equal
    "<>" is not equal

    Cheers,
    Dale

    Comment


    • #3
      Perhaps I am losing my mind! This made sense a few hours ago. Let me re look at what is going on...

      Comment


      • #4
        Losing?

        Just kidding.

        Join the club!
        Dale

        Comment


        • #5
          Sounds like an "After Midnight" piece of code. Best resolved the next day.
          hutch at movsd dot com
          The MASM Forum

          www.masm32.com

          Comment

          Working...
          X