Expand Minimize

PROFILEINFO structure

Contains information used when loading or unloading a user profile.

Syntax


typedef struct _PROFILEINFO {
  DWORD  dwSize;
  DWORD  dwFlags;
  LPTSTR lpUserName;
  LPTSTR lpProfilePath;
  LPTSTR lpDefaultPath;
  LPTSTR lpServerName;
  LPTSTR lpPolicyPath;
  HANDLE hProfile;
} PROFILEINFO, *LPPROFILEINFO;

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

Type: HANDLE

A handle to the HKEY_CURRENT_USER registry subtree. For more information, see Remarks.

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)

Unicode and ANSI names

PROFILEINFOW (Unicode) and PROFILEINFOA (ANSI)

See also

User Profiles Overview
LoadUserProfile
UnloadUserProfile

 

 

Community Additions

ADD
Show:
© 2014 Microsoft