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();