With the management of users, the program should be handled in the user directory when writing a program to the user's management.
char lpProfileDir [255]; DWORD size = 255; memset (lpProfileDir, 0, 255); HANDLE hToken = 0; BOOL bres1 = OpenProcessToken (GetCurrentProcess (), TOKEN_ALL_ACCESS, & hToken); BOOL bres = GetUserProfileDirectory (hToken, lpProfileDir, & size) ; // get the user directory of the current process user
// GetDefaultUserProfileDirectory C: / Documents and Settings / Default User // GetAllUsersprofileDirectory C: / Documents and Settings / All Users // GetProfilesDirectory C: / Documents and Setting