Group: Shell Functions - Library: userenv
Loads the specified user"s profile. The profile can be a local user profile or a roaming user profile.
BOOL WINAPI LoadUserProfile(
_In_ HANDLE hToken,
_Inout_ LPPROFILEINFO lpProfileInfo
);
DECLARE INTEGER LoadUserProfile IN userenv;
INTEGER hToken,;
INTEGER lpProfileInfo
hToken [in] Type: HANDLE Token for the user, which is returned by the LogonUser, CreateRestrictedToken, DuplicateToken, OpenProcessToken, or OpenThreadToken function.
lpProfileInfo [in, out] Type: LPPROFILEINFO Pointer to a PROFILEINFO structure.
TRUE if successful; otherwise, FALSE.
LoadUserProfile fails and returns ERROR_INVALID_PARAMETER if the dwSize member of the structure is not set to sizeof(PROFILEINFO) or if the lpUserName member is NULL.
See also: UnloadUserProfile