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
WindowsIdentity wi = WindowsIdentity.GetCurrent();
string tempLine = wi.Name;
string tempLine2 = tempLine.Split('\\');
this.strLoginName = tempLine2.ToString();
thanks Codeplug... Do you know how to use this function from VBA?
No, but I easily found this on MSDN: Office VBA and the Windows API