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.
[IUserIdentityManager::Logon is not supported and may be altered or unavailable in the future. Instead, use User Accounts with Fast User Switching and Remote Desktop.]
Displays a UI to the user, allowing the user to choose a user identity. If successful, the user identity will be logged on and retrieved.
Syntax
HRESULT Logon(
[in] HWND hwndParent,
[in] DWORD dwFlags,
[out] IUserIdentity **ppIdentity
);
Parameters
-
hwndParent [in]
-
Type: HWND
An HWND value that identifies a window that will be brought to the foreground after the logon UI is dismissed.
-
dwFlags [in]
-
Type: DWORD
Optional flags to define how the UI will behave. Set to UIL_FORCE_UI to force the UI to display, even if an identity has already been chosen.
-
ppIdentity [out]
-
Type: IUserIdentity**
The address of the pointer that receives the chosen user identity.
Return value
Type: HRESULT
Result of the logon operation. If successful, it returns S_OK. Otherwise it will return one of the following error codes.
| Return code | Description |
|---|---|
|
The user canceled the logon operation from the UI. |
|
The user identity could not be created. |
|
The operation failed unexpectedly. |
|
Identity management is disabled on the system. |
|
Identity management is disabled on the system. |
|
The system is currently switching identities, and cannot complete the operation. |
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client |
Windows 2000 Professional [desktop apps only] |
| Minimum supported server |
Windows 2000 Server [desktop apps only] |
| End of client support |
Windows 2000 Professional |
| End of server support |
Windows 2000 Server |
| Header |
|
| IDL |
|
| DLL |
|
See also