Need some info on obtaining the users login name when they start the 
Author Message
 Need some info on obtaining the users login name when they start the

Something like this would work

DWORD size = 2048;  // Setting up 2K buffer for the User Name
char name[250];     //  
LPTSTR lpBuffer;   // address of name buffer
LPDWORD nSize;     // address of size of name buffer

lpBuffer        = name;     // address of name buffer
nSize           = &size ;   // address of size of name buffer

GetUserName(lpBuffer,nSize);    // Get current user login account name

// now "name" would have the current user login account name

Quote:

><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
><html>
>Need some info on obtaining the users login name when they start the .exe
><p>TIA,
><br>?? Tim</html>

-----------------** -- Posted from CodeGuru -- **-----------------
http://www.*-*-*.com/ ;  The website for Visual C++ programmers.


Sat, 25 Aug 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Login name/User ID of a Novell user from VC

2. Obtaining Login ID, Machine Name

3. How to obtain the login time and the idle time of the user

4. Obtaining Login ID, Machine Name

5. how to obtain the login time and the idle time of the users

6. How to get login users cached info?

7. Get Windows2000 Login User name in ANSI-C

8. C# based webform needed to report client login name

9. Obtaining 95 Logon and/or Netware Login ID's

10. I need to get user info on NT 4.0

11. site w/ no authent, but need User.Identity.Name for 1 pg

12. How can i start a service before login the system(w2k)

 

 
Powered by phpBB® Forum Software