2025年11月14日 星期五  乙巳年 九月廿五 【蛇】丙戌月 丁亥日
用户名: 密 码: 保存
您现在的位置:首页 >> 硬件系统 >> 硬件系统 >> 内容

使用Delphi制作自动登录的Windows终端服务客户端

时间:2011/9/3 15:20:00 点击: 1598

  核心提示:运行delphi--Components--ImportActiveControl,在列表中找到下面的MicrosoftTerminalServicesActiveClient1.0TypeLibra...

运行delphi-->Components-->Import Active Control,在列表中找到下面的Microsoft Terminal Services Active Client 1.0 Type Library (Version 1.0),点击install

参考代码如下:

var
  proj: ImsRdpclientAdvancedSettings; //定义密码用
   p1: IMsRdpClientAdvancedSettingsDisp;  //自定义端口用

begin

 if MsRdpClient21.AdvancedSettings.QueryInterface(ImsRdpclientAdvancedSettings, proj) = S_OK then
  begin

    MsRdpClient21.UserName := 'test';
    proj.Set_ClearTextPassword('123456');

if RDform.MsRdpClient21.AdvancedSettings.QueryInterface(IMsRdpClientAdvancedSettingsDisp, p1) = S_OK then
            p1.RDPPort := StrToInt(Rport);

  end;
  MsRdpClient21.Server := '127.0.0.1';
  MsRdpClient21.Connect;

....

end;

作者:扬帆 来源:转载
惊讶 欠揍 支持 很棒 愤怒 搞笑 恶心 不解
共有评论 0相关评论
发表我的评论
  • 大名:
  • 内容:
本类推荐
  • 没有
本类固顶
  • 没有
  • 盒子文章 技术支持:深圳市麟瑞科技有限公司(www.2ccc.com) © 2025 版权所有 All Rights Reserved.
  • 粤ICP备10103342号-1