[This function is not available as of Windows Vista.]
Creates a user profile for a specified user.
BOOL WINAPI CreateUserProfileEx( _In_ PSID pSid, _In_ LPCTSTR lpUserName, _In_opt_ LPCTSTR lpUserHive, _Out_opt_ LPTSTR lpProfileDir, _In_ DWORD dwDirSize, _In_ BOOL bWin9xUpg );
- pSid [in]
The SID of the new user.
- lpUserName [in]
Pointer to a buffer that contains the user name of the new user.
- lpUserHive [in, optional]
Pointer to a buffer that contains the registry hive to use. This parameter can be NULL.
- lpProfileDir [out, optional]
Pointer to a buffer that, when this function returns, receives the user's profile directory path. This parameter can be NULL.
- dwDirSize [in]
Size of the buffer specified by lpProfileDir, in TCHARs.
- bWin9xUpg [in]
TRUE if the user profile is being created as part of a profile migration from Windows 9x; otherwise, FALSE.
When TRUE, the user profile is set up in the default profile directory—normally C:\Documents and Settings\UserName. If that directory already exists, it is used. If it does not, it is created.
If FALSE, the default profile directory is created if it does not exist. If the default profile directory already exists, a new directory is created for this user profile.
Returns TRUE if the new user profile was created successfully; otherwise, FALSE.
This function is not declared in the software development kit (SDK) headers and has no associated import library. You must use the LoadLibrary and GetProcAddress functions to link to Userenv.dll. The ANSI version of the function, CreateUserProfileExA is referenced from Userenv.dll as ordinal 153. The Unicode version, CreateUserProfileExW is referenced as ordinal 154.
End of client support
Unicode and ANSI names
|CreateUserProfileExW (Unicode) and CreateUserProfileExA (ANSI)|
Build date: 11/16/2013