通过服务器发送 [英] sending through server

查看:61
本文介绍了通过服务器发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要服务器方面的帮助

如果我想通过服务器从另一台计算机控制计算机
和控制鼠标

如果这种情况正确,我需要帮助:

将控制鼠标转换为字节,然后将其发送到服务器,服务器将把此字节发送到远程计算机
远程计算机会将这些字节转换为什么,以控制鼠标?

请我帮忙
因为我对服务器一无所知

thanx

I need some help in server

If I want to control computer from another computer through server
and control mouse

I need help if this scenario is correct :

convert control mouse to byte , then send it to server , the server will send this bytes to remote computer
the remote computer will convert this bytes to what , to controlling mouse ?

please I need help
because I don''t know any thing about server

thanx

推荐答案

请参阅我对问题的评论.由于您没有达成共同的目标,因此只能给出一些一般性想法.

如果要控制的主机未运行某些服务代码来响应来自其他主机的命令,则不会发生任何事情.基本上,您可以以Windows服务的形式创建网络服务.请参阅:
http://en.wikipedia.org/wiki/Windows_Service [ http://msdn2.microsoft.com/en-us/library/ms685141.aspx [ ^ ].

请从此处开始: http://msdn.microsoft.com/zh-我们/library/d56de412%28v=vs.100%29.aspx [我如何将byte []发送到另一台PC [ ^ ],
在局域网上与两个Windows应用程序进行通信. [^ ].

在服务器端,您可以使用Windows API SendInput(P/已调用)控制鼠标.请参阅:
http://msdn.microsoft.com/zh-我们/library/windows/desktop/ms646310%28v=vs.85%29.aspx [ http://www.pinvoke.net/default.aspx/user32.sendinput [ ^ ].

如果您仍然需要学习P/Invoke,请使用:
http://en.wikipedia.org/wiki/PInvoke [ http://msdn.microsoft.com/en-us/library/Aa712982 [ ^ ].

此CodeProject文章也可能有用:基本P/调用 [
Please see my comments to the question. As you did not share your purpose, it''s possible only to give a couple of general ideas.

Nothing can happen if the host to be controlled is not running some service code to respond to commands from other host. Basically, you can create a network service in the form of Windows Service. Please see:
http://en.wikipedia.org/wiki/Windows_Service[^],
http://msdn2.microsoft.com/en-us/library/ms685141.aspx[^].

Please start here: http://msdn.microsoft.com/en-us/library/d56de412%28v=vs.100%29.aspx[^].

You can do networking on several different layers; I overview them in my past answers:
how i can send byte[] to other pc[^],
Communication b/w two Windows applications on LAN.[^].

On the server side, you can control the mouse using the Windows API SendInput, P/Invoked. Please see:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[^],
http://www.pinvoke.net/default.aspx/user32.sendinput[^].

If you still need to learn P/Invoke, please use see:
http://en.wikipedia.org/wiki/PInvoke[^],
http://msdn.microsoft.com/en-us/library/Aa712982[^].

This CodeProject article can also be useful: Essential P/Invoke[^].

Again, hard to say if you can use some more specialized approach without knowing your goals, but pay attention for the advice by Björn Ranft in the comments to the question.

—SA


这篇关于通过服务器发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆