如何在windows中获取登录用户的全名? [英] How to get logged-in user's full name in windows?

查看:31
本文介绍了如何在windows中获取登录用户的全名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用windows API或其他方式获取登录用户的全名(他/她输入的真实姓名)?例如,如何获取John Smith",而不是john"(因为这是他的用户名).

How to get logged-in user's full name (the one he/she entered as his/her real name) using windows API or something else? For example how to get "John Smith", not "john" (as it were his username).

GetUserName(...)没有完成这项工作,因为它返回的是用户名,而不是全名.

GetUserName(...) doesn't do the job because it returns the username, not the full name.

推荐答案

您是否尝试过 GetUserNameEx(NameDisplay,...)?

Did you try GetUserNameEx(NameDisplay,...)?

这篇关于如何在windows中获取登录用户的全名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆