EapPeerBeginSession function

Starts an EAP authentication session on the peer EAPHost using the EAP method.


DWORD WINAPI EapPeerBeginSession(
  _In_        DWORD              dwFlags,
  _In_  const EapAttributes      *pAttributeArray,
  _In_        HANDLE             hTokenImpersonateUser,
  _In_        DWORD              dwSizeofConnectionData,
  _In_        BYTE               *pConnectionData,
  _In_        DWORD              dwSizeofUserData,
  _In_        BYTE               *pUserData,
  _In_        DWORD              dwMaxSendPacketSize,
  _Out_       EAP_SESSION_HANDLE *pSessionHandle,
  _Out_       EAP_ERROR          **ppEapError


dwFlags [in]

A combination of EAP flags that describe the new EAP authentication session behavior.

pAttributeArray [in]

A pointer to an EAP_ATTRIBUTES array structure that specifies the EAP attributes of the entity to authenticate.

hTokenImpersonateUser [in]

Specifies a handle to the user impersonation token to use in this session.

dwSizeofConnectionData [in]

Specifies the size, in bytes, of the connection data buffer provided in pConnectionData.

pConnectionData [in]

Connection data specific to this method used to decide the user data returned from this API, where the user data depends on certain connection data configuration. When this parameter is NULL the method implementation should use default values for connection.

dwSizeofUserData [in]

Specifies the size in bytes of the user data buffer provided in pUserData.

pUserData [in]

A pointer to a byte buffer that contains the opaque user data BLOB.

dwMaxSendPacketSize [in]

Specifies the maximum size in bytes of an EAP packet sent during the session. If the method needs to send a packet larger than the maximum size, the method must accommodate fragmentation and reassembly.

pSessionHandle [out]

A pointer to an EAP_SESSION_HANDLE structure that contains the unique handle for this EAP authentication session on the EAPHost server.

ppEapError [out]

A pointer to a pointer to an EAP_ERROR structure that contains any errors raised during the execution of this function call. After consuming the error data, this memory must be freed by calling EapPeerFreeErrorMemory.


This call is performed by a peer-based EAPHost using a function pointer to this API. This API must be implemented on the EAP method loaded by EAPHost, and must strictly conform to the syntax and parameter types specified in the documentation.


Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]



See also

EAPHost Peer Method Run-Time Functions



Community Additions