EapHostPeerGetResult function (eappapis.h)

Obtains the authentication result for the specified EAP authentication session.


DWORD EapHostPeerGetResult(
  [in]  EAP_SESSIONID                 sessionHandle,
  [in]  EapHostPeerMethodResultReason reason,
  [out] EapHostPeerMethodResult       *ppResult,
  [out] EAP_ERROR                     **ppEapError


[in] sessionHandle

A pointer to an EAP_SESSIONID structure that contains the unique handle for this EAP authentication session on the EAPHost server. This handle is returned in the pSessionId parameter in a previous call to EapHostPeerBeginSession.

[in] reason

An EapHostPeerMethodResultReason enumeration value that specifies the reason code for the authentication result returned in ppResult.

[out] ppResult

A pointer to a EapHostPeerMethodResultReason structure that contains the authentication results. EAPHost fills this structure with authentication related information defined in EapHostPeerMethodResult.

[out] ppEapError

A pointer to the address of an EAP_ERROR structure. The address should be set to NULL before calling this function. If error data is available, a pointer to the address of an EAP_ERROR structure that contains any errors raised during the execution of this function call is received. Supplicants must refer to this parameter to determine if the authentication was successful. After using the error data, free this memory by calling EapHostPeerFreeEapError.

Return value

If the function succeeds, the return value is NO_ERROR. The return value does not indicate if the authentication was successful. Supplicants must refer to the ppEapError parameter to determine the authentication result.

If the function fails, the return value should be an appropriate error code from Winerror.h, Raserror.h, or Mprerror.h.


The supplicant calls EapHostPeerGetResult on completion of an authentication, which can occur in any of the following scenarios.

  • A call to EapHostPeerProcessReceivedPacket returned the EapHostPeerResponseResult action code.
  • The client timed out and wants to get the result based on the current state.
  • The supplicant received an alternate result, perhaps from a packet on the lower layer.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header eappapis.h
Library Eappprxy.lib
DLL Eappprxy.dll

See also

EAPHost Supplicant Run-time Functions