locked
[Help] Obtain user information using IDirectorySearch RRS feed

  • Question

  • I need to obtain the username of the currently logged in user on a machine.

    For example, if I want login my computer with my AD account and I want to get “distinguished name” of “currently login user”, it should show the information which is “DC=XXX, OU=XXXX, CN=myname” (my disdinguished name).

    Is there a way to get “name” or “distinguished Name” of currently login user either in c++ or LDAP filter?  

    • Moved by Nancy Shao Wednesday, December 23, 2009 9:08 AM To get better support (From:Visual C++ Language)
    Monday, December 21, 2009 5:24 PM

Answers

All replies

  • I suggest you visit the Windows Security Programming Forum or the microsoft.public.adsi.general newsgroup.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Wednesday, December 23, 2009 12:54 AM
  • Hi Willian,

    I'm moving this thread to "Security for Applications in Microsoft Windows" forum, since the issue is related to Widnows Security. There are more Windows Security experts in the "Security for Application in Microsoft Windows" forum.

    Best Regards,
    Nancy

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, December 23, 2009 9:07 AM
  • Thank You
    • Marked as answer by William. W Monday, February 1, 2010 10:53 PM
    Wednesday, December 23, 2009 2:17 PM