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.

  • 相关阅读:
    Unable to connect to web server 'IIS Express'(无法连接到Web服务器“IIS Express”)的解决方式-Jexus Manager
    temp_web
    使用Fluent配置表关系
    面试题链接记录
    面试题
    SQL语言基础
    .net core中DbProviderFactories配置问题
    Swagger UI in AspNetCore WebAPI
    JS实现国密算法SM2加密,后端Java解密
    Java读取磁盘指定扇区
  • 原文地址:https://www.cnblogs.com/onionhacker/p/3538264.html
Copyright © 2011-2022 走看看