---
UID: NF:adhoc.IDot11AdHocInterface.IsAdHocCapable
title: IDot11AdHocInterface::IsAdHocCapable (adhoc.h)
description: Specifies whether a NIC supports the creation or use of an ad hoc network.
old-location: nwifi\idot11adhocinterface_isadhoccapable.htm
tech.root: NativeWiFi
ms.assetid: 18e3419f-500e-40bb-b7f1-125e95c55690
ms.date: 12/05/2018
ms.keywords: IDot11AdHocInterface interface [NativeWIFI],IsAdHocCapable method, IDot11AdHocInterface.IsAdHocCapable, IDot11AdHocInterface::IsAdHocCapable, IsAdHocCapable, IsAdHocCapable method [NativeWIFI], IsAdHocCapable method [NativeWIFI],IDot11AdHocInterface interface, adhoc/IDot11AdHocInterface::IsAdHocCapable, nwifi.idot11adhocinterface_isadhoccapable
f1_keywords:
- adhoc/IDot11AdHocInterface.IsAdHocCapable
dev_langs:
- c++
req.header: adhoc.h
req.include-header: 
req.target-type: Windows
req.target-min-winverclnt: Windows Vista [desktop apps only]
req.target-min-winversvr: Windows Server 2008 [desktop apps only]
req.kmdf-ver: 
req.umdf-ver: 
req.ddi-compliance: 
req.unicode-ansi: 
req.idl: Adhoc.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:
- adhoc.h
api_name:
- IDot11AdHocInterface.IsAdHocCapable
targetos: Windows
req.typenames: 
req.redist: 
ms.custom: 19H1
---

# IDot11AdHocInterface::IsAdHocCapable


## -description


Specifies whether a NIC supports the  creation or use of an ad hoc network.


## -parameters




### -param pfAdHocCapable [in, out]

A pointer to a boolean that specifies the NIC's ad hoc network capabilities. The boolean value is set to  <b>TRUE</b> if the NIC supports the creation and use of ad hoc networks and <b>FALSE</b> otherwise.


## -returns



Possible return values include, but are not limited to, the following.

<table>
<tr>
<th>Return code</th>
<th>Description</th>
</tr>
<tr>
<td width="40%">
<dl>
<dt><b>S_OK</b></dt>
</dl>
</td>
<td width="60%">
The method completed successfully.

</td>
</tr>
<tr>
<td width="40%">
<dl>
<dt><b>E_FAIL</b></dt>
</dl>
</td>
<td width="60%">
The method failed.

</td>
</tr>
<tr>
<td width="40%">
<dl>
<dt><b>E_INVALIDARG</b></dt>
</dl>
</td>
<td width="60%">
One of the parameters is invalid.

</td>
</tr>
<tr>
<td width="40%">
<dl>
<dt><b>E_OUTOFMEMORY</b></dt>
</dl>
</td>
<td width="60%">
The method could not allocate the memory required to perform this operation.

</td>
</tr>
<tr>
<td width="40%">
<dl>
<dt><b>E_POINTER</b></dt>
</dl>
</td>
<td width="60%">
A pointer passed as a parameter is not valid.

</td>
</tr>
</table>
 




## -remarks



<i>pfAdHocCapable</i> can be set to <b>FALSE</b> for many reasons, including the following:

<ul>
<li>Group policy prohibits the use of ad hoc networks on this interface</li>
<li>The machine is configured to only connect to infrastructure networks, or the machine configuration disallows wireless connections</li>
<li>The NIC does not support ad hoc networks</li>
</ul>



## -see-also




<a href="https://docs.microsoft.com/windows/desktop/api/adhoc/nn-adhoc-idot11adhocinterface">IDot11AdHocInterface</a>
 

 

