Partager via


WlanCloseHandle (Compact 7)

3/12/2014

This function closes a connection to the server.

Syntax

DWORD WINAPI WlanCloseHandle(
  __in        HANDLE hClientHandle,
  __reserved  PVOID pReserved
);

Parameters

  • hClientHandle
    The client's session handle, which identifies the connection to be closed. This handle was obtained by a previous call to the WlanOpenHandle function.
  • pReserved
    Reserved; set to NULL.

Return Values

Value Description

ERROR_SUCCESS

The function succeeds

ERROR_INVALID_PARAMETER

hClientHandle is NULL or invalid or pReserved is not NULL

ERROR_INVALID_HANDLE

The handle hClientHandle was not found in the handle table

RPC_STATUS

Various error codes

Remarks

After a connection has been closed, any attempted use of the closed handle can cause unexpected errors. Upon closing, all outstanding notifications are discarded.

If the client is in the middle of a notification callback when WlanCloseHandle is called, the function waits for the callback to finish before it returns a value. Calling this function inside a callback function will result in the call never completing. If both the callback function and the thread that closes the handle try to obtain the same lock, a deadlock may occur.

See Also

Reference

Native Wi-Fi Functions
WlanOpenHandle
Native Wi-Fi Reference