Share via


WlanDisconnect (Compact 7)

3/12/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:

  • The caller does not have sufficient permissions.
  • You included Connection Manager in your OS.

Remarks

If you include Connection Manager in your OS design:

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