Need some help with this Q 400 Points

billy21
billy21 used Ask the Experts™
on
http://www.experts-exchange.com/Programming/Q_20421662.html

I need an API call to find the login name of the currently logged in user in Windows XP Home ed.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I don't have XP, so I can't test this, but perhaps this will work:

Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Commented:
i have tested the solution given by twalgrave on windows XP professional edition and it is working fine. hope it will work on home edition too.

Author

Commented:
Thanks for testing the solution right.  I have awarded the 400 points to twalgrave.  These points are for your contribution.

Regards,

Billy
rightx,

Thanks for testing this out for me.  I really appreciate it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial