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.

  • 相关阅读:
    读《被绑架的中国经济》有感
    互联网世界观
    了解360 ~~《我的互联网方法论》
    了解腾讯~~《马化腾的商业帝国》
    nginx 动静分离 以及 负载均衡配置
    linux 常用命令
    solr 配置中文分词器
    solr搜索配置权重
    JDK8集合类源码解析
    JDK8集合类源码解析
  • 原文地址:https://www.cnblogs.com/onionhacker/p/3538264.html
Copyright © 2011-2022 走看看