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. 怎么取得当前使用的计算机的用户名呢

怎么取得当前使用的计算机的用户名呢

Scheduled Pinned Locked Moved C / C++ / MFC
questionlearning
21 Posts 9 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 alphaxz

    大家好! 怎么取得当前使用的计算机的用户名呢?

    a beginner

    T Offline
    T Offline
    toxcct
    wrote on last edited by
    #3

    dick head, we speak english here (if you hadn't notice yet)... BTW, have you seen this[^] ??

    [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

    A M 2 Replies Last reply
    0
    • T toxcct

      dick head, we speak english here (if you hadn't notice yet)... BTW, have you seen this[^] ??

      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      A Offline
      A Offline
      alphaxz
      wrote on last edited by
      #4

      sorry ,I forgot i want to know how can i get current user who is using the computyer 's name by API

      a beginner

      S T T 3 Replies Last reply
      0
      • A alphaxz

        sorry ,I forgot i want to know how can i get current user who is using the computyer 's name by API

        a beginner

        S Offline
        S Offline
        SandipG
        wrote on last edited by
        #5

        Read this thread Get Current User Name[^]

        Regards, Sandip.

        1 Reply Last reply
        0
        • A alphaxz

          大家好! 怎么取得当前使用的计算机的用户名呢?

          a beginner

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #6

          can that be in english?

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
          Never mind - my own stupidity is the source of every "problem" - Mixture

          cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/xml>

          R 1 Reply Last reply
          0
          • A alphaxz

            sorry ,I forgot i want to know how can i get current user who is using the computyer 's name by API

            a beginner

            T Offline
            T Offline
            ThatsAlok
            wrote on last edited by
            #7

            GetComputerName()

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
            Never mind - my own stupidity is the source of every "problem" - Mixture

            cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/xml>

            D 1 Reply Last reply
            0
            • T ThatsAlok

              can that be in english?

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
              Never mind - my own stupidity is the source of every "problem" - Mixture

              cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/xml>

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

              ThatsAlok wrote:

              can that be in english?

              No, it will not be. MVPs should get directly in the person's soul and retrieve the question.[^] ;P See archivist.

              Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

              T 1 Reply Last reply
              0
              • A alphaxz

                sorry ,I forgot i want to know how can i get current user who is using the computyer 's name by API

                a beginner

                T Offline
                T Offline
                toxcct
                wrote on last edited by
                #9

                and i already replied to you with this link[^] :suss:

                [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                1 Reply Last reply
                0
                • R Rajesh R Subramanian

                  ThatsAlok wrote:

                  can that be in english?

                  No, it will not be. MVPs should get directly in the person's soul and retrieve the question.[^] ;P See archivist.

                  Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                  T Offline
                  T Offline
                  ThatsAlok
                  wrote on last edited by
                  #10

                  Rajesh R Subramanian wrote:

                  No, it will not be. MVPs should get directly in the person's soul and retrieve the question.[^]

                  actaully i given that power to you for sometime.. that's why you are so active ;P

                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                  Never mind - my own stupidity is the source of every "problem" - Mixture

                  cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/xml>

                  1 Reply Last reply
                  0
                  • A alphaxz

                    大家好! 怎么取得当前使用的计算机的用户名呢?

                    a beginner

                    J Offline
                    J Offline
                    Jijo Raj
                    wrote on last edited by
                    #11

                    alphaxz wrote:

                    大家好! 怎么取得当前使用的计算机的用户名呢?

                    Google translation says -

                    Good!
                    How to use the current computer user name?

                    You could use the function - NetWkstaUserGetInfo(). For code snippet - check here[^]. Translation 您可以使用的功能- Netwkstausergetinfo( ) 。为程式码片段-检查在这里。 Well, please do not post questions in native language. Because those who can read it may not be able to answer it and those who can answer it may not be able to read it. ;) Regards, Jijo.

                    _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                    T A 2 Replies Last reply
                    0
                    • J Jijo Raj

                      alphaxz wrote:

                      大家好! 怎么取得当前使用的计算机的用户名呢?

                      Google translation says -

                      Good!
                      How to use the current computer user name?

                      You could use the function - NetWkstaUserGetInfo(). For code snippet - check here[^]. Translation 您可以使用的功能- Netwkstausergetinfo( ) 。为程式码片段-检查在这里。 Well, please do not post questions in native language. Because those who can read it may not be able to answer it and those who can answer it may not be able to read it. ;) Regards, Jijo.

                      _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                      T Offline
                      T Offline
                      toxcct
                      wrote on last edited by
                      #12

                      Jijo raj wrote:

                      Well, please do not

                      Please do read other answers before posting too ;P

                      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                      J 1 Reply Last reply
                      0
                      • T ThatsAlok

                        GetComputerName()

                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                        Never mind - my own stupidity is the source of every "problem" - Mixture

                        cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/xml>

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

                        Which is completely different than GetUserName().

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

                        "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

                        1 Reply Last reply
                        0
                        • T toxcct

                          dick head, we speak english here (if you hadn't notice yet)... BTW, have you seen this[^] ??

                          [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                          M Offline
                          M Offline
                          Mark Salsbery
                          wrote on last edited by
                          #14

                          When calling someone a loser, it's VERY important to spell it right. Unless, of course, you meant "looser"... ;P

                          Mark Salsbery Microsoft MVP - Visual C++ :java:

                          T 1 Reply Last reply
                          0
                          • M Mark Salsbery

                            When calling someone a loser, it's VERY important to spell it right. Unless, of course, you meant "looser"... ;P

                            Mark Salsbery Microsoft MVP - Visual C++ :java:

                            T Offline
                            T Offline
                            toxcct
                            wrote on last edited by
                            #15

                            nope, i meant "Loooooooooooser"... get it ? :rolleyes:

                            [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                            M 1 Reply Last reply
                            0
                            • T toxcct

                              nope, i meant "Loooooooooooser"... get it ? :rolleyes:

                              [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                              M Offline
                              M Offline
                              Mark Salsbery
                              wrote on last edited by
                              #16

                              I don't get it. Get it? Loooooooooser is much better.

                              Mark Salsbery Microsoft MVP - Visual C++ :java:

                              1 Reply Last reply
                              0
                              • T toxcct

                                Jijo raj wrote:

                                Well, please do not

                                Please do read other answers before posting too ;P

                                [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                                J Offline
                                J Offline
                                Jijo Raj
                                wrote on last edited by
                                #17

                                toxcct wrote:

                                Please do read other answers before posting too Poke tongue

                                I did before posting mine. :) Tox, I went through the thread once again and i think i read the posts randomly. :(( I've to be more careful while posting replies. :) And i thought about giving the same advice to him once again. Its absolutely free. ;P Regards, Jijo.

                                _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                                T 1 Reply Last reply
                                0
                                • J Jijo Raj

                                  toxcct wrote:

                                  Please do read other answers before posting too Poke tongue

                                  I did before posting mine. :) Tox, I went through the thread once again and i think i read the posts randomly. :(( I've to be more careful while posting replies. :) And i thought about giving the same advice to him once again. Its absolutely free. ;P Regards, Jijo.

                                  _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                                  T Offline
                                  T Offline
                                  toxcct
                                  wrote on last edited by
                                  #18

                                  nevermind ;)

                                  [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                                  1 Reply Last reply
                                  0
                                  • J Jijo Raj

                                    alphaxz wrote:

                                    大家好! 怎么取得当前使用的计算机的用户名呢?

                                    Google translation says -

                                    Good!
                                    How to use the current computer user name?

                                    You could use the function - NetWkstaUserGetInfo(). For code snippet - check here[^]. Translation 您可以使用的功能- Netwkstausergetinfo( ) 。为程式码片段-检查在这里。 Well, please do not post questions in native language. Because those who can read it may not be able to answer it and those who can answer it may not be able to read it. ;) Regards, Jijo.

                                    _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                                    A Offline
                                    A Offline
                                    alphaxz
                                    wrote on last edited by
                                    #19

                                    I've got an error error C2065: 'Netwkstausergetinfo' : undeclared identifier

                                    a beginner

                                    R 1 Reply Last reply
                                    0
                                    • A alphaxz

                                      I've got an error error C2065: 'Netwkstausergetinfo' : undeclared identifier

                                      a beginner

                                      R Offline
                                      R Offline
                                      Rane
                                      wrote on last edited by
                                      #20

                                      alphaxz wrote:

                                      error C2065: 'Netwkstausergetinfo' : undeclared identifier

                                      Function name is incorrect! - It should be NetWkstaUserGetInfo and not Netwkstausergetinfo :)

                                      A 1 Reply Last reply
                                      0
                                      • R Rane

                                        alphaxz wrote:

                                        error C2065: 'Netwkstausergetinfo' : undeclared identifier

                                        Function name is incorrect! - It should be NetWkstaUserGetInfo and not Netwkstausergetinfo :)

                                        A Offline
                                        A Offline
                                        alphaxz
                                        wrote on last edited by
                                        #21

                                        thank u very much my mistakes

                                        a beginner

                                        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