Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的 c++ 项目中使用 netusergetinfo 函数。
该功能工作正常。
但它不能给主目录值。它是空值。
我怎样才能做到这一点?
您可以使用SHGetKnownFolderPath函数 (with FOLDERID_Profile) 获取指定用户的配置文件目录。
SHGetKnownFolderPath
FOLDERID_Profile