WinBioGetDomainLogonSetting function

Retrieves a value that specifies whether users can log on to a domain by using biometric information.

Syntax


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

Parameters

Value [out]

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

Source [out]

Pointer to a WINBIO_SETTING_SOURCE_TYPE value that specifies 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 WinBioGetDomainLogonSetting to determine whether users can log on to a domain 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
TestGetDomainLogonSetting( )
{
    HRESULT hr = S_OK;
    BOOLEAN value = FALSE;
    WINBIO_SETTING_SOURCE_TYPE source = WINBIO_SETTING_SOURCE_INVALID;

    // Call WinBioGetDomainLogonSetting.
    wprintf_s(L"\n Calling WinBioGetDomainLogonSetting \n");
    WinBioGetDomainLogonSetting( 
        &value,     // Whether biometric domain logons are enabled
        &source     // The source of the setting
        );

    // Print any errors.
    if (source == WINBIO_SETTING_SOURCE_INVALID)
    {
        wprintf_s(L"\n WinBioGetDomainLogonSetting returned ");
        wprintf_s(L"WINBIO_SETTING_SOURCE_INVALID\n");
        hr = E_FAIL;
        goto e_Exit;
    }
    else 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 WinBioGetLogonSetting returned garbage\n");
        hr = E_FAIL;
        goto e_Exit;
    }
    // Print the value and source output parameters.
    else
    {
        wprintf_s(L"\n Value: %s, Source: ", value ? L"TRUE" : L"FALSE");

        switch(source)
        {
            case WINBIO_SETTING_SOURCE_INVALID:
                wprintf_s(L"WINBIO_SETTING_SOURCE_INVALID\n");
                break;
            case WINBIO_SETTING_SOURCE_DEFAULT:
                wprintf_s(L"WINBIO_SETTING_SOURCE_DEFAULT\n");
                break;
            case WINBIO_SETTING_SOURCE_POLICY:
                wprintf_s(L"WINBIO_SETTING_SOURCE_POLICY\n");
                break;
            case WINBIO_SETTING_SOURCE_LOCAL:
                wprintf_s(L"WINBIO_SETTING_SOURCE_LOCAL\n");
                break;
            default:
                wprintf_s(L"[unrecognized source]");
                break;
        }
    }

e_Exit:

    wprintf_s(L"\n Press any key to exit...");
    _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

 

 

Show: