WlanReasonCodeToString (Compact 7)


This function retrieves a string that describes a specified reason code.


DWORD WlanReasonCodeToString(
  __in        DWORD dwReasonCode,
  __in        DWORD dwBufferSize,
  __in        PWCHAR pStringBuffer,
  __reserved  PVOID pReserved


  • dwReasonCode
    A WLAN_REASON_CODE value of which the string description is requested.
  • dwBufferSize
    The size of the buffer that is 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, an access violation will occur in the calling program.
  • pStringBuffer
    Pointer to a buffer that will receive the string. The caller must allocate memory to pStringBuffer before it calls WlanReasonCodeToString.
  • pReserved
    Reserved; set to NULL.

Return Values

Value Description

The return value is a pointer to a constant string

The function succeeds.


dwBufferSize is 0, pStringBuffer is NULL, or pReserved is not NULL.


Various error codes.

See Also


Native Wi-Fi Functions
Native Wi-Fi Reference