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. NT User ID Using Visual C++

NT User ID Using Visual C++

Scheduled Pinned Locked Moved C / C++ / MFC
c++questioncsharpjavatutorial
2 Posts 2 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.
  • C Offline
    C Offline
    canniballl
    wrote on last edited by
    #1

    I have to write a very small app in VC++ for my small shop. They want it written in VC++, otherwise I'd do this in Java or C#. Anyway, at one point, they want to record which NT USER performed a transaction. They specifically said: "We want whatever Windows XP recognizes the current user as. So, whoever is logged into Windows, user their ID." How do I do this? In really easy in Java and C#, but I don't know offhand how to do it in VC++. Info: Windows XP Pro (Some MIGHT have Win2000, but 99% have XP) I did this once in VB (might have hit a .dll to get the info) and it still works under XP. But the code is gone, so I don't know which DLL. Thanks, Chris

    J 1 Reply Last reply
    0
    • C canniballl

      I have to write a very small app in VC++ for my small shop. They want it written in VC++, otherwise I'd do this in Java or C#. Anyway, at one point, they want to record which NT USER performed a transaction. They specifically said: "We want whatever Windows XP recognizes the current user as. So, whoever is logged into Windows, user their ID." How do I do this? In really easy in Java and C#, but I don't know offhand how to do it in VC++. Info: Windows XP Pro (Some MIGHT have Win2000, but 99% have XP) I did this once in VB (might have hit a .dll to get the info) and it still works under XP. But the code is gone, so I don't know which DLL. Thanks, Chris

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      Might GetUserName be what you're after? Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      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