c++ - Win32 equivalent of getuid() -
I am in the process of porting Windows from C ++ library to Linux, and having problems with Getuid ()
P> You are the user associated with the current thread Can reclaim the name:
// ANSI version string GetWindowsUserNameA () {char buffer [UNLEN + 1] = {0}; DWORD Buffer_Len = UNLEN + 1; If (! :: GetUserNameA (buffer, and buffer_lan)) {// error handling} return string (buffer); }
Comments
Post a Comment