WlanDisconnect (Compact 2013)
3/26/2014
This function disconnects an interface from its current network.
Syntax
DWORD WINAPI WlanDisconnect(
__in HANDLE hClientHandle,
__in const GUID* pInterfaceGuid,
__reserved PVOID pReserved
);
Parameters
- hClientHandle
[in] Handle to the session on the client. To obtain a handle, call WlanOpenHandle.
- pInterfaceGuid
[in] GUID of the interface to be disconnected.
- pReserved
Reserved; set to NULL.
Return Values
Value |
Description |
---|---|
ERROR_SUCCESS |
The function succeeds. |
ERROR_INVALID_PARAMETER |
hClientHandle is NULL or invalid, pInterfaceGuid is NULL, or pReserved is not NULL. |
ERROR_INVALID_HANDLE |
The handle hClientHandle was not found in the handle table. |
RPC_STATUS |
Can be any Remote Procedure Call (RPC) error code. The RPC call may be unsuccessful due to Wlan RPC server issues, such as when the RPC server is not started. Refer to RPC for more information. |
ERROR_NOT_ENOUGH_MEMORY |
Could not allocate memory for the query results. |
ERROR_ACCESS_DENIED |
One of the following occurred:
|
Remarks
If you include Connection Manager in your OS design:
- You must handle Wi-Fi connection operations using Connection Manager APIs such as CmAcquireConnection, CmAddConnectionConfig, or CmReleaseConnection.
- Otherwise, if you use this API, it returns ERROR_ACCESS_DENIED
When a connection is established by using WlanConnect, a profile is specified by the strProfile member of the WLAN_CONNECTION_PARAMETERS structure pointed to by pConnectionParameters.
See Also
Reference
Native Wi-Fi Functions
WlanOpenHandle
WlanConnect
WlanSetProfile
WlanSaveTemporaryProfile
Native Wi-Fi Reference