Share via


WlanOpenHandle (Compact 7)

3/12/2014

This function opens a connection to the server.

Syntax

DWORD WINAPI WlanOpenHandle(
  __in        DWORD dwClientVersion,
  __reserved  PVOID pReserved,
  __out       PDWORD pdwNegotiatedVersion,
  __out       PHANDLE phClientHandle
);

Parameters

  • dwClientVersion
    Specifies the highest version of the WLAN API that the client supports.
  • pReserved
    Reserved; set to NULL.
  • pdwNegotiatedVersion
    Specifies the version of the WLAN API to be used in this session. This value is usually the highest version supported by both the client and the server.
  • phClientHandle
    Specifies a handle for the client to use in this session. This handle is used by other functions throughout the session.

Return Values

Value Description

ERROR_SUCCESS

The function succeeds.

ERROR_INVALID_PARAMETER

pdwNegotiatedVersion is NULL, phClientHandle is NULL, or pReserved is not NULL.

ERROR_NOT_ENOUGH_MEMORY

Could not allocate memory to create the client context.

RPC_STATUS

Various error codes.

ERROR_REMOTE_SESSION_LIMIT_EXCEEDED

Too many handles have been issued by the server.

Remarks

The version number that is specified by dwClientVersion and pdwNegotiatedVersion is a composite version number composed of both major and minor versions. The major version is specified by the high-order word and the minor version is specified by the low-order word. The macros WLAN_API_VERSION_MAJOR(_v) and WLAN_API_VERSION_MINOR(_v) return the major and minor version numbers respectively. You can construct a version number by using the macro WLAN_API_MAKE_VERSION(_major, _minor).

See Also

Reference

Native Wi-Fi Functions
WlanCloseHandle
Native Wi-Fi Reference