Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves the type of profile loaded for the current user.
Syntax
USERENVAPI BOOL GetProfileType(
[out] DWORD *dwFlags
);
Parameters
[out] dwFlags
Type: DWORD*
Pointer to a variable that receives the profile type. If the function succeeds, it sets one or more of the following values:
PT_MANDATORY
The user has a Mandatory User Profiles.
PT_ROAMING
The user has a Roaming User Profiles.
PT_ROAMING_PREEXISTING
The user has a Roaming User Profile that was created on another PC and is being downloaded. This profile type implies PT_ROAMING.
PT_TEMPORARY
The user has a Temporary User Profiles; it will be deleted at logoff.
Return value
Type: BOOL
TRUE if successful; otherwise, FALSE. To get extended error information, call GetLastError.
Remarks
If the user profile is not already loaded, the function fails.
Note that the caller must have KEY_READ access to HKEY_LOCAL_MACHINE. This access right is granted by default. For more information, see Registry Key Security and Access Rights.
If the profile type is PT_ROAMING_PREEXISTING, Explorer will not reinitialize default programs associations when a profile is loaded on a machine for the first time.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | userenv.h |
Library | Userenv.lib |
DLL | Userenv.dll |