How can I get the Windows user name in VB6?

  • Thread starter Thread starter Jim Olsen
  • Start date Start date
J

Jim Olsen

Hi,

It will be in use in a Domain consisting of Windows XP workstations and a
Windows 2003 SBS server.

Basically, the application will be run from a workstation on the domain. I
am able to get the username by calling advapi32.dll. This works fine, but is
actually not the info I'm after. I need to get what is called the "Display
Name" in Active Directory.

For example, my username may be JoeBlo, but my name might actually be Joe
Bloggs and is entered into Active Directory as such. This name (Joe Bloggs)
rather than the username is displayed in Windows XP at the top of the
default Start Menu.

The name is what I'm after, but I don't know how to get it.

Any pointers would be appreciated.

Regards,
Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top