Export (0) Print
Expand All
Expand Minimize

WlanReasonCodeToString function

The WlanReasonCodeToString function retrieves a string that describes a specified reason code.

Syntax


DWORD WlanReasonCodeToString(
  _In_        DWORD dwReasonCode,
  _In_        DWORD dwBufferSize,
  _In_        PWCHAR pStringBuffer,
  _Reserved_  PVOID pReserved
);

Parameters

dwReasonCode [in]

A WLAN_REASON_CODE value of which the string description is requested.

dwBufferSize [in]

The size of the buffer used to store the string, in WCHAR. If the reason code string is longer than the buffer, it will be truncated and NULL-terminated. If dwBufferSize is larger than the actual amount of memory allocated to pStringBuffer, then an access violation will occur in the calling program.

pStringBuffer [in]

Pointer to a buffer that will receive the string. The caller must allocate memory to pStringBuffer before calling WlanReasonCodeToString.

pReserved

Reserved for future use. Must be set to NULL.

Return value

If the function succeeds, the return value is a pointer to a constant string.

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

Return codeDescription
ERROR_INVALID_PARAMETER

A parameter is incorrect. This error is returned if any of the following conditions occur:

  • dwBufferSize is 0.
  • pStringBuffer is NULL.
  • pReserved is not NULL.
Other

Various RPC and other error codes. Use FormatMessage to obtain the message string for the returned error.

 

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

WLAN_REASON_CODE

 

 

Community Additions

ADD
Show:
© 2014 Microsoft