nareshtest0101 wrote:
I want to implement both, but I don't want to use RDP is there any other way?
Of course you can create your own application-level protocol and implement it in your software. This is not very easy.
First, the adequate form of the server side would be a Windows Service. Start here:
http://msdn.microsoft.com/en-us/library/d56de412%28v=VS.100%29.aspx[
^].
I would suggest you implement everything using interactive application at first, convert it to a Windows Service after you debug most of the functionality of the server side: debugging of interactive application is much easier.
Some problem is the translation if input sent through the network to actual input on the server side. Use P/Invoked Windows API
SendInput
(and nothing else; you will really need low-level simulation of input, as it was done through actual hardware and device drivers for mouse/keyboard), see:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[
^],
http://pinvoke.net/default.aspx/user32.sendinput[
^].
If you need to learn P/Invoke, see:
http://en.wikipedia.org/wiki/P/Invoke[
^],
http://msdn.microsoft.com/en-us/library/Aa712982[
^];
see also this CodeProject article:
Essential P/Invoke[
^].
You should create an application-level protocol on top of TCP. You can use different levels of networking: from sockets (better in the form of
TcpListener/TcpClient
) to classical remoting or WCF (in this case, self-hosted by your service). I overview different levels in my past answers:
how i can send byte[] to other pc[
^],
Communication b/w two Windows applications on LAN.[
^].
—SA