Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Called by the Windows Biometric Framework to cancel all pending sensor operations.
PIBIO_SENSOR_CANCEL_FN PibioSensorCancelFn;
HRESULT PibioSensorCancelFn(
[in, out] PWINBIO_PIPELINE Pipeline
)
{...}
[in, out] Pipeline
Pointer to the WINBIO_PIPELINE structure associated with the biometric unit performing the operation.
If the function succeeds, it returns S_OK. If the function fails, it must return one of the following HRESULT values to indicate the error.
Return code | Description |
---|---|
|
The Pipeline argument cannot be NULL. |
|
The SensorHandle member of the WINBIO_PIPELINE structure pointed to by the Pipeline argument is set to INVALID_HANDLE_VALUE. |
Your implementation of this function should not wait for pending operations to complete.
If the sensor has no pending operations when this function is called, your implementation must return S_OK without changing the state of the pipeline.
The following pseudocode shows one possible implementation of this function. The example does not compile. You must adapt it to suit your purpose.
//////////////////////////////////////////////////////////////////////////////////////////
//
// SensorAdapterCancel
//
// Purpose:
// Cancels all pending sensor operations.
//
// Parameters:
// Pipeline - Pointer to a WINBIO_PIPELINE structure associated with
// the biometric unit.
//
static HRESULT
WINAPI
SensorAdapterCancel(
__inout PWINBIO_PIPELINE Pipeline
)
{
HRESULT hr = S_OK;
// Verify that the Pipeline parameter is not NULL.
if (!ARGUMENT_PRESENT(Pipeline))
{
hr = E_POINTER;
goto cleanup;
}
// Validate the current sensor state.
if (Pipeline->SensorHandle == INVALID_HANDLE_VALUE)
{
return WINBIO_E_INVALID_DEVICE_STATE;
}
// Cancel all I/O to the sensor handle.
if (!CancelIoEx(Pipeline->SensorHandle, NULL))
{
hr = _SensorAdapterGetHresultFromWin32(GetLastError());
}
return hr;
}
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | winbio_adapter.h (include Winbio_adapter.h) |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today