get windows login

This is a discussion on get windows login within the C++ Programming forums, part of the General Programming Boards category; Does anybody know how to get the windows login through c or c++. There has to be an api outthere ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    223

    get windows login

    Does anybody know how to get the windows login through c or c++. There has to be an api outthere that does this but I don't know what it is. I know how to do it with C# but now I am working on an Access 2002 project and was thinking of maybe creating a dll in c++ so that I could call it from vba. In C# this is the way you do it

    Code:
    WindowsIdentity wi = WindowsIdentity.GetCurrent();
    string tempLine = wi.Name;
    string[] tempLine2 = tempLine.Split('\\');	
    this.strLoginName = tempLine2[1].ToString();
    zMan

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,646

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    223
    thanks Codeplug... Do you know how to use this function from VBA?
    zMan

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,646
    No, but I easily found this on MSDN: Office VBA and the Windows API

    gg

  5. #5
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to make a windows application
    By crvenkapa in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2007, 09:59 AM
  2. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  3. dual boot Win XP, win 2000
    By Micko in forum Tech Board
    Replies: 6
    Last Post: 05-30-2005, 02:55 PM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  5. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21