windows远程桌面功能和粘贴拷贝功能

本文介绍了Windows远程桌面的rdpclip.exe工具及其在剪贴板功能出现问题时的解决办法,分析了远程桌面窗口消息处理,并提供了设置远程桌面连接允许剪贴板传递的步骤和代码示例,同时讲解了如何开启远程控制服务端,包括注册表项fDenyTSConnections的设置和端口调整。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一 rdpclip.exe

无法往服务器复制文件有以下2两种情况:

1、复制粘贴功能原本可以用,突然失灵了

2、从头到尾都无法使用这个复制粘贴功能

针对第一种情况,只需重启一下rdpclip.exe就可以了。

 

rdpclip.exe是 Windows Server 资源工具包中提供的 Rdpclip 实用程序,它的功能就是在“终端服务”客户端(本机)和“终端”服务器(远程服务器)之间复制和粘贴文件,也包括粘贴文本。这个程序的文件路径是 c:windows\system32\dpclip.exe

 

远程关闭剪贴板进程:

TASKKILL /S 10.109.50.252 /U administrator /P root821 /IM rdpclip.exe

二 远程桌面窗口分析

 

登陆进去之后:截取窗口消息;=》重置剪切板;

//  TscShellAxHostClass 

==》 ATL:00007FFC58414F60

==》 UIMainClass

==》 UIContainerClass

==》 IHWindowClass    ==》 拦截键盘/鼠标消息;

三 远程桌面连接

现在我要实现这样一个功能,远程登录阿里云的服务器,然后把服务器上的一个文件拷贝下来。
想要在远程桌面(Remote Desktop,简称RDP)与本地系统之间传递文件,有两种方式,都需要在登陆远程桌面前设置:
方法一:
1.在登陆远程桌面的窗口中,展开【选项】,如图:


2.接着在展开的连接窗口中选择【本地资源】选项卡,如图



3.勾选【剪贴板】
这样连接后,就可以通过本地和远程桌面的【拷贝】【粘贴】操作,进行数据的传送,本方法不限文件,还可以传递文字、图片等等。

四 远程连接代码如下

https://www.cnblogs.com/wuguoqiang/p/9371805.html

 

CString strServerUsername = m_stLoginSeverInfo.strServerName;

CString strServerPassword = m_stLoginSeverInfo.strServerPassword;

CString strServerIP = m_stLoginSeverInfo.strServerIP;

CMsRdpClientAdvancedSettings6 m_MsRdpClientAdvancedSettings(m_RemoteDesktopControl.get_AdvancedSettings());

 

m_RemoteDesktopControl.put_Server(strServerIP);

m_RemoteDesktopControl.put_UserName(strServerUsername);

m_MsRdpClientAdvancedSettings.put_ClearTextPassword(strServerPassword);

 

m_RemoteDesktopControl.put_DesktopWidth(nScreenWidth);

m_RemoteDesktopControl.put_DesktopHeight(nScreenHeight);

m_RemoteDesktopControl.put_ColorDepth(32);

 

m_MsRdpClientAdvancedSettings.put_RedirectClipboard(TRUE); // 设置允许剪贴板

m_MsRdpClientAdvancedSettings.put_EnableCredSspSupport(TRUE);//

m_MsRdpClientAdvancedSettings.put_Compress(1);

m_MsRdpClientAdvancedSettings.put_BitmapPeristence(1);

 

m_MsRdpClientAdvancedSettings.put_singleConnectionTimeout(20);

m_RemoteDesktopControl.put_ConnectingText(_T("请稍后......"));

m_RemoteDesktopControl.Connect();

五 远程控制服务端:

1:注册表项fDenyTSConnections

注册表fDenyTSConnections键值0(开启),可以通过pc自带的远程工具连接上:

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Terminal Server”项目,然后在右栏中找到“fDenyTSConnections”键,双击打开后将该键值修改为“0”,点击“确定”按钮。

2:工具开启或是关闭

启用Win10家庭版的远程桌面服务端:可以修改远程桌面服务端的端口和启用状态;

https://blog.csdn.net/sinat_34439107/article/details/83030348

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值