I want to get the current login name in windows xp, windows 7, in C ++. How can i do this? Is there a user-friendly API without authority?
Use the Win32 API GetUserName or GetUserNameEx if you want a bit more options.
This should work:
char sz[256]; GetEnvironmentVariable ("USERNAME", sz, 256);
Source: https://habr.com/ru/post/1733825/More articles:Floating-point exception thrown by rand () In C ++ - c ++Tip: creating a simple database-based CMS in PHP - phpIs depreciation really desirable? - algorithmLike gsub slash "/" with backslash and slash "\ /" in ruby - ruby | fooobar.comOpen default browser as standard user (C ++) - c ++Как может токенизировать эту строку в java? - javaDebugging Breakpoint - debuggingStoring data under the stack pointer? - stackhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1733829/equivalents-to-z80-djnz-instruction-on-other-architectures&usg=ALkJrhi_lp9hkJWqSPGdCbBvQHc1lu7tXQOpen a website when a user clicks on a shortcut field on a BlackBerry - blackberryAll Articles