---
UID: NF:asyncinfo.IAsyncInfo.Cancel
title: IAsyncInfo::Cancel (asyncinfo.h)
description: Requests cancellation of the asynchronous operation already in progress.
old-location: winrt\iasyncinfo_cancel.htm
tech.root: WinRT
ms.assetid: f011c6e3-dd8f-4f77-8f06-be2a3fb1e0f0
ms.date: 12/05/2018
ms.keywords: Cancel, Cancel method [Windows Runtime], Cancel method [Windows Runtime],IAsyncInfo interface, IAsyncInfo interface [Windows Runtime],Cancel method, IAsyncInfo.Cancel, IAsyncInfo::Cancel, asyncinfo/IAsyncInfo::Cancel, winrt.iasyncinfo_cancel
f1_keywords:
- asyncinfo/IAsyncInfo.Cancel
dev_langs:
- c++
req.header: asyncinfo.h
req.include-header: 
req.target-type: Windows
req.target-min-winverclnt: Windows 8 [desktop apps \| UWP apps]
req.target-min-winversvr: Windows Server 2012 [desktop apps \| UWP apps]
req.kmdf-ver: 
req.umdf-ver: 
req.ddi-compliance: 
req.unicode-ansi: 
req.idl: AsyncInfo.idl
req.max-support: 
req.namespace: 
req.assembly: 
req.type-library: 
req.lib: 
req.dll: 
req.irql: 
topic_type:
- APIRef
- kbSyntax
api_type:
- COM
api_location:
- AsyncInfo.h
api_name:
- IAsyncInfo.Cancel
targetos: Windows
req.typenames: 
req.redist: 
ms.custom: 19H1
---

# IAsyncInfo::Cancel


## -description


Requests cancellation of the asynchronous operation already in progress.


## -parameters






## -returns



Type: <b>HRESULT</b>

If this method succeeds, it returns <b xmlns:loc="http://microsoft.com/wdcml/l10n">S_OK</b>. Otherwise, it returns an <b xmlns:loc="http://microsoft.com/wdcml/l10n">HRESULT</b> error code.




## -see-also




<a href="https://docs.microsoft.com/windows/desktop/api/asyncinfo/nn-asyncinfo-iasyncinfo">IAsyncInfo</a>
 

 

