Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Username & password!!

Username & password!!

Scheduled Pinned Locked Moved C / C++ / MFC
jsonquestion
12 Posts 7 Posters 0 Views 1 Watching
  • 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.
  • A Offline
    A Offline
    Ajay L D
    wrote on last edited by
    #1

    Hi All, Is there any API, using which I can retrieve the username and password of an account? Thank you, AJ

    C R H 3 Replies Last reply
    0
    • A Ajay L D

      Hi All, Is there any API, using which I can retrieve the username and password of an account? Thank you, AJ

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Yes and it even works for remote machines. :-D

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      T 1 Reply Last reply
      0
      • C CPallini

        Yes and it even works for remote machines. :-D

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

        T Offline
        T Offline
        tina newcoder
        wrote on last edited by
        #3

        CPallini wrote:

        Yes and it even works for remote machines.

        wats that API ??? :omg:

        _ C H 3 Replies Last reply
        0
        • T tina newcoder

          CPallini wrote:

          Yes and it even works for remote machines.

          wats that API ??? :omg:

          _ Offline
          _ Offline
          _AnsHUMAN_
          wrote on last edited by
          #4

          :-D What would have happened to the Windows Security then...

          Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

          1 Reply Last reply
          0
          • T tina newcoder

            CPallini wrote:

            Yes and it even works for remote machines.

            wats that API ??? :omg:

            C Offline
            C Offline
            CPallini
            wrote on last edited by
            #5

            Actually you need a few calls (and a callback):

            HRESULT hr;
            HSP hSP = GetSuperPowers(hInstance);
            LPCSTR szRemoteMachine = "fooserver"; // set properly
            if (! hSP ) return -1;
            hr = UseSuperPowersToEnumIdentities(hSP, szRemoteMachine, IdentityProc);

            where

            LRESULT CALLBACK IdentityProc(LPVOID lpParam)
            {
            if ( ! lpParam ) return 0;
            LPUSERIDENTITY pui = (LPUSERIDENTITY) lpParam;

            LPCSTR szName = pui->lpszUserName;
            LPCSTR szPwd = pui->lpszUserPAssword;
            //...
            }

            You can get the fully working code on www.cpallini.plz.urgent.com :laugh: BTW have always a look at post's icon before reading it. :rolleyes:

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

            H 1 Reply Last reply
            0
            • A Ajay L D

              Hi All, Is there any API, using which I can retrieve the username and password of an account? Thank you, AJ

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #6

              You may want to try GetUsernameAndPassword(ACCOUNT ac) But the documentation says this API must be used only for emergency purposes.

              Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

              D 1 Reply Last reply
              0
              • R Rajesh R Subramanian

                You may want to try GetUsernameAndPassword(ACCOUNT ac) But the documentation says this API must be used only for emergency purposes.

                Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                Rajesh R Subramanian wrote:

                But the documentation says this API must be used only for emergency purposes.

                The subject contains two exclamation points. Does that qualify as an emergency?

                "Love people and use things, not love things and use people." - Unknown

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                R 1 Reply Last reply
                0
                • A Ajay L D

                  Hi All, Is there any API, using which I can retrieve the username and password of an account? Thank you, AJ

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  Why you want to try this program?

                  1 Reply Last reply
                  0
                  • C CPallini

                    Actually you need a few calls (and a callback):

                    HRESULT hr;
                    HSP hSP = GetSuperPowers(hInstance);
                    LPCSTR szRemoteMachine = "fooserver"; // set properly
                    if (! hSP ) return -1;
                    hr = UseSuperPowersToEnumIdentities(hSP, szRemoteMachine, IdentityProc);

                    where

                    LRESULT CALLBACK IdentityProc(LPVOID lpParam)
                    {
                    if ( ! lpParam ) return 0;
                    LPUSERIDENTITY pui = (LPUSERIDENTITY) lpParam;

                    LPCSTR szName = pui->lpszUserName;
                    LPCSTR szPwd = pui->lpszUserPAssword;
                    //...
                    }

                    You can get the fully working code on www.cpallini.plz.urgent.com :laugh: BTW have always a look at post's icon before reading it. :rolleyes:

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                    H Offline
                    H Offline
                    Hamid Taebi
                    wrote on last edited by
                    #9

                    Your site is good for every things but it has a little problem that any protocol on the internet doesn support it :laugh: .

                    C 1 Reply Last reply
                    0
                    • T tina newcoder

                      CPallini wrote:

                      Yes and it even works for remote machines.

                      wats that API ??? :omg:

                      H Offline
                      H Offline
                      Hamid Taebi
                      wrote on last edited by
                      #10

                      You must know that reply was of Mr Pallini. :laugh:

                      1 Reply Last reply
                      0
                      • D David Crow

                        Rajesh R Subramanian wrote:

                        But the documentation says this API must be used only for emergency purposes.

                        The subject contains two exclamation points. Does that qualify as an emergency?

                        "Love people and use things, not love things and use people." - Unknown

                        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                        R Offline
                        R Offline
                        Rajesh R Subramanian
                        wrote on last edited by
                        #11

                        My bad. I missed the double exclamation marks! :doh:

                        Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                        1 Reply Last reply
                        0
                        • H Hamid Taebi

                          Your site is good for every things but it has a little problem that any protocol on the internet doesn support it :laugh: .

                          C Offline
                          C Offline
                          CPallini
                          wrote on last edited by
                          #12

                          Nope. It shares the server with www.cpallini.freeproducts.com and hence it is often down due to lack of funds. :sigh: BTW: if you would like to kindly contribute... :laugh:

                          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups