Export (0) Print
Expand All
Expand Minimize

GetProfileType function

Retrieves the type of profile loaded for the current user.

Syntax


BOOL WINAPI GetProfileType(
  _Out_  DWORD *pdwFlags
);

Parameters

pdwFlags [out]

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Userenv.h

Library

Userenv.lib

DLL

Userenv.dll

See also

User Profiles Overview
User Profiles Reference
LoadUserProfile

 

 

Community Additions

ADD
Show:
© 2015 Microsoft