I am developing a GUI to be used for an automated test platform. We are using LabWindows 8.1.1 on Windows XP. The computer we are using will have two separate Windows accounts for the developers and testers, with the program having different permissions for each.
I originally created the developers account as "SDP PLATE" and I was using GetCurrentUser() to detect the user ID and set the permissions accordingly. I am now trying to change the name of this account to "Admin" through the Windows control panel. However, GetCurrentUser() still reads the user ID as the old name.
Is there something else I need to change to get this to work, perhaps in the Windows registry?
I have also tried using the Windows SDK GetUserName() function, which I can't get to work at all. It always returns an error code of 122 (insufficient buffer size), no matter how large I make the string buffer.