GetProfilesDirectory

[DllImport("userenv.dll", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern bool GetProfilesDirectory(
   [Out] StringBuilder lpProfileDir,
   ref uint lpcchSize
);

Microsoft documentation: Link

Last updated