Export (0) Print
Expand All
Expand Minimize
6 out of 6 rated this helpful - Rate this topic

WlanCloseHandle function

The WlanCloseHandle function closes a connection to the server.

Syntax


DWORD WINAPI WlanCloseHandle(
  _In_        HANDLE hClientHandle,
  _Reserved_  PVOID pReserved
);

Parameters

hClientHandle [in]

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 for future use. Set this parameter to NULL.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value may be one of the following return codes.

Return codeDescription
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.

Do not call WlanCloseHandle from a callback function. If the client is in the middle of a notification callback when WlanCloseHandle is called, the function waits for the callback to finish before returning 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 acquire the same lock, a deadlock may occur. In addition, do not call WlanCloseHandle from the DllMain function in an application DLL. This could also cause a deadlock.

Requirements

Minimum supported client

Windows Vista, Windows XP with SP3 [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Redistributable

Wireless LAN API for Windows XP with SP2

Header

Wlanapi.h (include Wlanapi.h)

Library

Wlanapi.lib

DLL

Wlanapi.dll

See also

WlanOpenHandle

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.