Win32Lib getUserName() problem
- Posted by AndyDrummond Dec 16, 2009
- 1384 views
I have recently written a program which uses the Win32Lib getUserName() routine. This works fine, but if the user changes his name in Windows, the getUsername() routine still gets his original name. Now I guess that Windows - XP SP3 in my case - creates the initial user group with the original name, but then just hangs a string on it with the name. Initially the name created, but after that whatever the user has called himself.
Is there any way that anyone knows whereby I can get the current user's name, rather than the name the current account was created with?
Thanks in advance...
Andy