VC里如何得到Windows当前登陆的用户名
1个回答
2018-07-12 · 百度知道官方认证企业
腾讯电脑管家
腾讯电脑管家是腾讯公司推出的免费安全管理软件,能有效预防和解决计算机上常见的安全风险,并帮助用户解决各种电脑“疑难杂症”、优化系统和网络环境,是中国综合能力最强、最稳定的安全软件。
向TA提问
关注
展开全部
GetUserName
The GetUserName function retrieves the user name of the current thread. This is the name of the user currently logged onto the system.
Use the GetUserNameEx function to retrieve the user name in a specified format. Additional information is provided by the IADsADSystemInfo interface.
BOOL GetUserName(
LPTSTR lpBuffer,
LPDWORD nSize
);
The GetUserName function retrieves the user name of the current thread. This is the name of the user currently logged onto the system.
Use the GetUserNameEx function to retrieve the user name in a specified format. Additional information is provided by the IADsADSystemInfo interface.
BOOL GetUserName(
LPTSTR lpBuffer,
LPDWORD nSize
);
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询