Reji
Reji

Reputation: 3516

Capturing Remote desktop request

I have an app running at the Machine-A, now Machine-B is requesting a remote desktop to Machine-A. The app running at Machine-A needs to capture this request and log it. Is this possible through either C++/C#.

I have googled to find, if there's any widows message being transmitted, but in vain. Also I won't be able to bind to the port 3389, as its already being used by Remote Desktop server.

Upvotes: 0

Views: 383

Answers (2)

Dan Ports
Dan Ports

Reputation: 1451

You can receive notifications of various remote desktop events via ServiceBase.OnSessionChange (if your .NET application is running as a Windows service) or WTSRegisterSessionNotification. To get additional information about the new session, you can use other WTS* functions, or the Cassia library from a .NET application.

Upvotes: 1

BarsMonster
BarsMonster

Reputation: 6585

Surely you cannot bind, but you CAN sniff traffic - read for raw sockets and/or PCAP driver.

Upvotes: 1

Related Questions