Erweitern Minimieren

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);

Parameter

Funktion umfasst keine Parameter.

Rückgabewert

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.

 

Hinweise

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.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Ws2tcpip.h

Bibliothek

Fwpuclnt.lib

DLL

Fwpuclnt.dll

Siehe auch

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

 

 

Anzeigen:
© 2014 Microsoft