WSARevertImpersonation function [Filtering]

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

int WSARevertImpersonation(void);

Parameters

This function has no parameters.

Return Value

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

Remarks

This function is only available in user mode.

Requirements

Client Requires Windows Vista.
Server Requires Windows Server "Longhorn".
Header

Declared in Ws2tcpip.h.

Library

Use Fwpuclnt.lib.

DLL Requires Fwpuclnt.dll.

See Also

Using Secure Socket Extensions
Windows Filtering Platform API Reference
Windows Filtering Platform API Functions