您现在的位置:首页 >> 硬件系统 >> 硬件系统 >> 内容

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

时间:2011/9/3 15:20:10 点击:

  核心提示:运行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) © 2024 版权所有 All Rights Reserved.
  • 沪ICP备05001939号