来自C#的RDP [英] RDP from c#
问题描述
嘿,
我想从c#连接到指定服务器/用户名的远程桌面连接.
我发现:
http://www.databaseforum.info/2/22/0a0e1d2da27798df.html
解决方案应引用AxMSTSCLib dll.
我不想从任何地方下载此dll,因为我不确定我是否可以信任它.
但是它也说:
经过网上研究后,我发现必须创建新的AxMSTSCLib
和MSTSCLib DLL.所以我做了"
如何创建"此新AxMSTSCLib?
其他链接不使用此dll,而是运行脚本.
http://bytes.com/topic/c-sharp/answers/517024-远程桌面连接c
但是该代码会引发安全性异常".所以我不能使用它.
感谢您的帮助.
Hey,
I want to connect to a remote desktop connection to a specified server/username from c#.
I have found:
http://www.databaseforum.info/2/22/0a0e1d2da27798df.html
a AxMSTSCLib dll should be referenced to the solution.
I don''t want to download this dll from anywhere as I''m not sure if I can trust it.
However it also says:
"After research on the web I found that I have to create new AxMSTSCLib
and MSTSCLib DLLs. So I did"
How do I "create" this new AxMSTSCLib ?
Other link, doesn''t use this dll but run an script instead.
http://bytes.com/topic/c-sharp/answers/517024-remote-desktop-connection-c
but that code throws Security Exception. So I cannot use it.
Thanks for any help
推荐答案
在项目中向添加引用"对话框的"COM"选项卡上的Microsoft终端服务客户端添加引用.
这将为您提供对MSTSCLib的引用,并从那里可以创建客户端等.这应该是最简单的方法.
在寻找答案的过程中,我在将Remotes Desktop Client嵌入其中的以下内容中找到了以下内容:网页 [ ^ ]
这将带您获得大量有用的信息.
Add a reference in your project to the Microsoft Terminal Services Client on the COM tab of the Add Reference dialog.
This will give you a reference to MSTSCLib and from there you can create a client, etc. This should be the easiest way to do it.
On my way to finding out about this I found the following on Embedding the Remotes Desktop Client In a web page [^]
This takes you to a lot of good information.
这篇关于来自C#的RDP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!