WinBioGetLogonSetting function

Retrieves a value that indicates whether users can log on by using biometric information.

Syntax


HRESULT WINAPI WinBioGetLogonSetting(
  _Out_  BOOLEAN *Value,
  _Out_  PWINBIO_SETTING_SOURCE_TYPE Source
);

Parameters

Value [out]

Pointer to a Boolean value that specifies whether biometric logons are enabled.

Source [out]

Pointer to a WINBIO_SETTING_SOURCE_TYPE value that specifics the setting source. This can be one of the following values:

ValueMeaning
WINBIO_SETTING_SOURCE_INVALID

The setting is not valid.

WINBIO_SETTING_SOURCE_DEFAULT

The setting originated from built-in policy.

WINBIO_SETTING_SOURCE_LOCAL

The setting originated in the local computer registry.

WINBIO_SETTING_SOURCE_POLICY

The setting was created by Group Policy.

 

Return value

If the function succeeds, it returns S_OK. If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

Examples

The following function calls WinBioGetLogonSetting to determine whether users can log on by using biometric information. Link to the Winbio.lib static library and include the following header files:

  • Windows.h
  • Stdio.h
  • Conio.h
  • Winbio.h

HRESULT TestGetLogonSetting( )
{
    HRESULT hr = S_OK;
    BOOLEAN value = FALSE;
    WINBIO_SETTING_SOURCE_TYPE source = WINBIO_SETTING_SOURCE_INVALID;
    WCHAR *sourceName = NULL;

    // Call WinBioGetLogonSetting.
    wprintf_s(L"\n Calling WinBioGetLogonSetting \n");
    WinBioGetLogonSetting( 
        &value,     // Whether biometric domain logons are enabled
        &source     // The source of the setting
        );
    if (FAILED(hr))
    {
        wprintf_s(L"\n WinBioGetLogonSetting failed. ");
        wprintf_s(L"hr = 0x%x\n", hr);
        goto e_Exit;
    }

    switch(source)
    {
    case WINBIO_SETTING_SOURCE_INVALID:
        sourceName = L"WINBIO_SETTING_SOURCE_INVALID";
        break;
    case WINBIO_SETTING_SOURCE_DEFAULT:
        sourceName = L"WINBIO_SETTING_SOURCE_DEFAULT";
        break;
    case WINBIO_SETTING_SOURCE_POLICY:
        sourceName = L"WINBIO_SETTING_SOURCE_POLICY";
        break;
    case WINBIO_SETTING_SOURCE_LOCAL:
        sourceName = L"WINBIO_SETTING_SOURCE_LOCAL";
        break;
    default:
        break;
    }

    if (source == WINBIO_SETTING_SOURCE_INVALID ||
        source == WINBIO_SETTING_SOURCE_DEFAULT ||
        source == WINBIO_SETTING_SOURCE_POLICY ||
        source == WINBIO_SETTING_SOURCE_LOCAL)
    {
        wprintf_s(L"\n Value: %s, Source: %s\n", 
                    value ? L"TRUE" : L"FALSE", 
                    sourceName
                    );
    }
    else
    {
        wprintf_s(L"\n (Unrecognized source)\n");
    }

e_Exit:

    wprintf_s(L"\n Press any key to continue...");
    _getch();

    return hr;

}



Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Winbio.h (include Winbio.h)

Library

Winbio.lib

DLL

Winbio.dll

See also

Client Application Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft