Community
    • Login

    Daily WTF

    Scheduled Pinned Locked Moved Humour
    8 Posts 5 Posters 3.8k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • donhoD Offline
      donho
      last edited by

      Return value

      Type: UINT
      If the specified item does not exist, the return value is -1.

      Ref:
      https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmenustate#return-value

      EkopalypseE 1 Reply Last reply Reply Quote 3
      • EkopalypseE Offline
        Ekopalypse @donho
        last edited by

        @donho

        hahahaha

        69aa7f25-e11c-4cd2-bf1c-ad5a3de9473b-image.png

        donhoD 1 Reply Last reply Reply Quote 1
        • EkopalypseE Offline
          Ekopalypse
          last edited by Ekopalypse

          but I also like this one very much

          6260a60e-fb8f-4efe-a871-3ea04eb7e2f1-image.png

          1 Reply Last reply Reply Quote 3
          • donhoD Offline
            donho @Ekopalypse
            last edited by

            @ekopalypse
            Hehe, you passed there before I did.

            As a result, that’s my only solution:
            https://github.com/notepad-plus-plus/notepad-plus-plus/commit/94154b0f0e281b4bbfad9c59f8d01c9dff305c12#diff-ea60a18644324fe9be5958a9435c911ba104980e68482bdab1037a3c134c18c9R107

            EkopalypseE 1 Reply Last reply Reply Quote 1
            • EkopalypseE Offline
              Ekopalypse @donho
              last edited by

              @donho

              With me it’s a bit different - I ignored it, so I didn’t implement it :-) … until now, anyway.

              1 Reply Last reply Reply Quote 3
              • mere-humanM Offline
                mere-human
                last edited by

                Jokes aside, this is expected to be UINT_MAX.
                See my comment for more info https://github.com/notepad-plus-plus/notepad-plus-plus/commit/94154b0f0e281b4bbfad9c59f8d01c9dff305c12#commitcomment-66609009

                1 Reply Last reply Reply Quote 1
                • Erez WandermanE Offline
                  Erez Wanderman
                  last edited by

                  Why like this glibc???
                  b5b29e71-6bdf-4e3c-839c-7c737f2b679e-image.png

                  1 Reply Last reply Reply Quote 1
                  • ThosRTannerT Offline
                    ThosRTanner
                    last edited by

                    While looking at the win32 xml APIs, I found https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms762722(v=vs.85)

                    Specifically the C API here:

                    HRESULT load(  
                        VARIANT xmlSource,  
                        VARIANT_BOOL *isSuccessful);
                    

                    where

                    Parameters
                    
                    xmlSource[in]
                    An indicator of the source XML to parse. This may be an URL (String/BSTR), a Request object (in an ASP page), an IStream, SAFEARRAY of bytes (VT_ARRAY|VT_UI1), a DOMDocument object, or any object that supports IStream, ISequentialStream, or IPersistStream. See Remarks for more information.
                    
                    isSuccessful[out, retval]
                    True if the load succeeded; False if the load failed.
                    
                    Return Values
                    
                    S_OK
                    The value returned if successful.
                    
                    S_FALSE
                    The value returned if the load fails.
                    
                    E_INVALIDARG
                    The value returned if the isSuccessful parameter is Null.
                    

                    So you have to pass a pointer to a bool to hold more or less the same information as the return value of the function, and if you pass a null pointer, you get your hand spanked…

                    1 Reply Last reply Reply Quote 3

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors