×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

API (Windows UserID & Computer Name)
3

API (Windows UserID & Computer Name)

API (Windows UserID & Computer Name)

(OP)
Please, can some one help me ?
i would like to know how to get the current user name by and the current computer name using an API method

Thx

RE: API (Windows UserID & Computer Name)

Hi,

Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Public Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long


Hope it helps

Jimmy

RE: API (Windows UserID & Computer Name)

Jimmy, do you know how to get an IP address of a user on a network by user/login name?

RE: API (Windows UserID & Computer Name)

Hardcore, you would retrieve the IP after matching the user with a computer name. The address can be extracted fairly easily. Please post this question in the appropriate forum, since it is off-topic here.

Actually, the entire contents of this forum are off-topic. I just got tired of red-flagging every post. That isn't a very good way to foster discussion. Let's talk about this in the VB or C forums.


Alt255@Vorpalcom.Intranets.com
Klatu barada nikto, y'all.

RE: API (Windows UserID & Computer Name)

2
There is a FAQ with the complete solution:

FAQ222-429

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close