zoukankan      html  css  js  c++  java
  • 拨号设置

    unit Unit1;

    interface

    uses
      Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
      Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,Registry,ShlObj;

    type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    buffer : Array[0..86] of Byte = ($46, $00, $00, $00, $01, $00, $00, $00, $05, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $1f, $00, $00, $00, $68, $74, $74, $70, $3a, $2f, $2f, $31, $32, $37, $2e, $30, $2e, $30, $2e, $31, $3a, $38, $30, $38, $36, $2f, $70, $72, $6f, $78, $79, $2e, $70, $61, $63, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00);

    implementation

    {$R *.dfm}

    procedure TForm1.Button1Click(Sender: TObject);
    var
      reg:tregistry;
    begin
       reg:=tregistry.Create;
            reg.RootKey:=HKEY_CURRENT_USER;
            REG.OpenKey('SOFTWAREMicrosoftWindowsCurrentVersionInternet SettingsConnections',true) ;
            Reg.WriteBinaryData('宽带连接', buffer[0], Length(buffer));
            SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil); //立刻更新
            reg.CloseKey;
            reg.Free;
    end;

    end.

  • 相关阅读:
    Lua build and install
    tomcat 配置的另外一种方法
    debian vsftp
    git(1)
    jd-gui安装
    debian crash log查看
    ros学习笔记
    51nod 1138 连续整数的和(数学公式)
    51nod 1428 活动安排问题(优先队列)
    Codeforces Round #347 (Div. 2) (练习)
  • 原文地址:https://www.cnblogs.com/onionhacker/p/3538264.html
Copyright © 2011-2022 走看看