User name from AD

I've been away from C++ and MS for awhile and need help with active directory. I have a Qt program and would like to get the user's name from active directory and use that as a default email address in my application.
closed account (48bpfSEw)
this code lists all users in the active directory:

https://msdn.microsoft.com/en-us/library/ms676882(v=vs.85).aspx

Topic archived. No new replies allowed.