NT User ID Using Visual C++
-
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
-
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
Might
GetUserName
be what you're after? Joaquín M López Muñoz Telefónica, Investigación y Desarrollo