Is there any API to get the path: "C: \ Documents and Settings" in C ++ windows?
not: C: \ Documents and Settings \ brianfu \ My Documents.
Many thanks!
Thanks for the luke solution:
GetProfilesDirectory
it works!
Prior to Windows Vista, this can be obtained using GetProfilesDirectory () .
In Windows Vista +, this can be done using SHGetKnownFolderIDList()and SHGetKnownFolderPath()using the constant FOLDERID_UserProfiles KNOWNFOLDERID .
SHGetKnownFolderIDList()
SHGetKnownFolderPath()
(% HOMEPATH%), ( ).
It is available with the key ProfilesDirectoryin HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.
ProfilesDirectory
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
(Note that on Win7 (and Vista?) This will C:\Usersnot C:\Documents and Settings.
C:\Users
C:\Documents and Settings
Source: https://habr.com/ru/post/1750463/More articles:Opening iWorks Documents on iPad UIWebView - objective-cA persistent subclass as a superclass using Hibernate - inheritanceIs there a way to prevent triggers from being turned on? - sqlHibernate / NHibernate: how to save a subclass as an instance of a superclass - c #Are there libraries supporting MTOM encryption in Python - pythonDoes this code meet the definition of recursion? - c ++TFS, testing and placement of test files (where) - c #How can I create against Microsoft.Web.Administration (IIS 7.x) on a Windows 2003 machine? - c #How to mark array value types in PHP (Java) Doc? - arraysHow can I check if any specific jQuery user interface function is available and use another function if it is not? - javascriptAll Articles