Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WSARevertImpersonation function

The WSARevertImpersonation function terminates the impersonation of a socket peer. This must be called after calling WSAImpersonateSocketPeer and finishing any access checks.

Syntax


int WSAAPI WSARevertImpersonation(void);

Parameters

This function has no parameters.

Return value

If the function succeeds, the return value is zero. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.

Some possible error codes are listed below.

Error codeMeaning
WSASYSCALLFAILURE

A system call that should never fail has failed.

 

Remarks

The WSARevertImpersonation function causes the calling thread to discontinue the impersonation of a socket peer. If the thread is not currently impersonating a socket peer, no action is taken.

The WSARevertImpersonation function should be called after calling WSAImpersonateSocketPeer and all access checks are finished.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Ws2tcpip.h

Library

Fwpuclnt.lib

DLL

Fwpuclnt.dll

See also

Using Secure Socket Extensions
Windows Filtering Platform
Windows Filtering Platform API Functions
Winsock Secure Socket Extensions
WSADeleteSocketPeerTargetName
WSAImpersonateSocketPeer
WSAQuerySocketSecurity
WSASetSocketPeerTargetName
WSASetSocketSecurity

 

 

Show:
© 2017 Microsoft