|
-
July 25th, 2002, 11:37 AM
#1
NT/XP username
All I want to do is extract a NT username from the registry or a system variable or wherever, how can I do this? How do I properly use GetEnvironmentVariable() properly?
-
July 25th, 2002, 11:49 AM
#2
-
July 25th, 2002, 11:50 AM
#3
You can use
BOOL GetUserName(
LPTSTR lpBuffer, // name buffer
LPDWORD nSize // size of name buffer
);
If the buffer is too small, the function fails GetLastError returns ERROR_MORE_DATA. The nSize parameter receives the required buffer size.
-
July 25th, 2002, 01:27 PM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|