Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.18 KB

LoadUserProfile.md

File metadata and controls

56 lines (38 loc) · 1.18 KB

Home

Function name : LoadUserProfile

Group: Shell Functions - Library: userenv


Loads the specified user"s profile. The profile can be a local user profile or a roaming user profile.


Code examples:

How to load a user profile

Declaration:

BOOL WINAPI LoadUserProfile(
  _In_     HANDLE hToken,
  _Inout_  LPPROFILEINFO lpProfileInfo
);  

FoxPro declaration:

DECLARE INTEGER LoadUserProfile IN userenv;
	INTEGER hToken,;
	INTEGER lpProfileInfo  

Parameters:

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.


Return value:

TRUE if successful; otherwise, FALSE.


Comments:

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