18.104.22.168.32 RpcWinStationCheckLoopBack (Opnum 65)
The RpcWinStationCheckLoopBack method checks if there is a loopback when a client tries to connect. Loopback refers to opening a terminal server session on the local machine.<209> The caller is not required to have any specific permission to call this method.
BOOLEAN RpcWinStationCheckLoopBack( [in] SERVER_HANDLE hServer, [out] DWORD* pResult, [in] DWORD ClientLogonId, [in] DWORD TargetLogonId, [in, size_is(NameSize)] PWCHAR pTargetServerName, [in, range(0, 1024)] DWORD NameSize );
pResult: Failure error code if the call to RpcWinStationCheckLoopBack failed. If the call was successful, this parameter MUST be STATUS_SUCCESS (0x00000000).
The call was successful.
A loopback was detected.
The server is in the process of shutting down and cannot complete the request.
ClientLogonId: The ID of the session from which the terminal server client was started.
TargetLogonId: The session ID to which the client is trying to connect.
pTargetServerName: The name of the target server to which the client is connecting. The string MUST contain the terminating NULL character.
NameSize: The length of the pTargetServerName string in characters including the terminating NULL character.
Return Values: Returns FALSE if there is no loopback, and TRUE if a loopback was detected. This method returns TRUE also in the case when an error was encountered during the loopback test. In this case, the pResult value contains the relevant error code.
A loopback was detected or the method call failed.
A loopback was not detected.