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.
  • 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