Share via


VerifyUserAsync (Compact 2013)

3/28/2014

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.

    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

See Also

Reference

LASS Functions