PROFILEINFOA structure

Contains information used when loading or unloading a user profile.

Syntax

typedef struct _PROFILEINFOA {
  DWORD             dwSize;
  DWORD             dwFlags;
  MIDL_STRING LPSTR lpUserName;
  MIDL_STRING LPSTR lpProfilePath;
  MIDL_STRING LPSTR lpDefaultPath;
  MIDL_STRING LPSTR lpServerName;
  MIDL_STRING LPSTR lpPolicyPath;
#if ...
  ULONG_PTR         hProfile;
#else
  HANDLE            hProfile;
#endif
} PROFILEINFOA, *LPPROFILEINFOA;

Members

dwSize

Type: DWORD

The size of this structure, in bytes.

dwFlags

Type: DWORD

This member can be one of the following flags:

PI_NOUI

Prevents the display of profile error messages.

PI_APPLYPOLICY

Not supported.

lpUserName

Type: LPTSTR

A pointer to the name of the user. This member is used as the base name of the directory in which to store a new profile.

lpProfilePath

Type: LPTSTR

A pointer to the roaming user profile path. If the user does not have a roaming profile, this member can be NULL. To retrieve the user's roaming profile path, call the NetUserGetInfo function, specifying information level 3 or 4. For more information, see Remarks.

lpDefaultPath

Type: LPTSTR

A pointer to the default user profile path. This member can be NULL.

lpServerName

Type: LPTSTR

A pointer to the name of the validating domain controller, in NetBIOS format.

lpPolicyPath

Type: LPTSTR

Not used, set to NULL.

hProfile.#3344380034

hProfile.#2709105829

Remarks

Do not use environment variables when specifying a path. The LoadUserProfile function does not expand environment variables, such as %username%, in a path.

When the LoadUserProfile call returns successfully, the hProfile member receives a registry key handle opened to the root of the user's subtree, opened with full access (KEY_ALL_ACCESS). For more information see the Remarks sections in LoadUserProfile, Registry Key Security and Access Rights, and Registry Hives.

Services and applications that call LoadUserProfile should check to see if the user has a roaming profile. If the user has a roaming profile, specify its path as the lpProfilePath member of this structure.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header profinfo.h (include Userenv.h)

See Also

LoadUserProfile

UnloadUserProfile

User Profiles Overview