Share via


VerifyUserAsync

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function starts a VerifyUser request. This function is equivalent to a synchronous VerifyUser call except it does not block, and results will be made available when the LASSHandle becomes signaled.

Syntax

LASSHandle  VerifyUserAsync(
  const GUID *AEKey,
  LPCWSTR wszAEDisplayText,
  HWND hWndParent, 
  DWORD dwOptions,
  PVOID pExtended
);

Parameters

  • AEKey
    [in] This is the authentication event identifier.
  • wszAEDisplayText
    [in] The text that will be displayed in the plugin. If this value is NULL, the value set in the registry is used.
  • hWndParent
    [in] The handle to the parent window if it is available, otherwise the handle to the desktop window.
  • dwOptions
    [in] Bitmask of possible options are shown in the following table.

    Flag Description

    VU_NO_UI

    Complete VerifyUser without displaying the UI. Return true only if a call to the LAP is not necessary.

    VU_HANDLE_MASTER_KEY

    Handle master key encryption and decryption if master key encryption and decryption is supported.

    > [!NOTE] > The VU_HANDLE_MASTER_KEY option is valid only when it is set by a privileged application.

    VU_UNTIL_SUCCESS

    Keep calling into the LAP until the user cancels, or until the user successfully logs in.

  • pExtended
    Reserved. Must be zero.

Return Value

VerifyUserAsync returns a LASSHandle that can be passed to WaitForSingleObject.

NULL implies that an error occurred . For extended error information, see GetLastError.

Remarks

All LASSHandles returned from VerifyUserAsync should be closed by LASSClose.

Results for the VerifyUserAsync call can be picked up by calling LASSGetResult. Results will only be valid after the returned LASSHandle has been signaled.

The following code sample demonstrates how VerifyUserAsync can be used:

const LASSHandle  hVerifyUser = VerifyUserAsync (
    AEKey, wszAEDisplayText, hWndParent,dwOptions,pExtended,); 
 
if (hVerifyUser == NULL)
  {
  // error information in GetLastError()
  return FALSE;
  }
// Wait till VerifyUser completes
DWORD ret = WaitForSingleObject(hVerifyUser,INFINITE);
BOOL bRet = LASSGetResult(hVerifyUser);
// bRet and GetLastError() contain the results of the VerifyUserAsync call. 
// Clean up the handle
  LASSCloseHandle(hVerifyUser);

Requirements

Header lap.h
Windows Mobile Windows Mobile 6 Classic and later, Windows Mobile 6 Professional and later, Windows Mobile 6 Standard and later

See Also

Reference

LASS Functions