Arsip: Ganti Ip Addess

 
user image
more 13 years ago

jagur

Bro... gmn caranya ganti ip address pake delphi, ane udah serch di artikel gak dapet plis tolong ya.... tks
user image
more 13 years ago

ichan29

ip address buat apa?? apakah utk ip address server database, ato ip utk koneksi socket?? klo utk server database, tinggal buat sample mungkin dg metode file ini, contoh klo pake ADOConnection, tinggal "User ID=" nilainya km ambil dr file ini itu, byk cara bro klo maen socket, tinggal addressnya diisikan
user image
more 13 years ago

jagur

buat lokalan doang (LAN).... jadi mis : kan ditempatku ada 3 klass IP, nah biar bisa switch ke salahsatu ip itu gimana...
user image
more 13 years ago

xerion

hmm? ip server ? atau ip client yang diganti ? kalau ip server buat client connect ganti aja di properti ClientSocket atau yg lain ... kalau ganti ip di komputer cari My Network Properties. ada dialog buat ganti ip .... yg lain ada bisa jelasin lebih detail ?
user image
more 13 years ago

jagur

buat ip client bro, kalau ganti ip di komputer cari My Network Properties. ada dialog buat ganti ip . kalo inikan pake propertinya windows..... nah kalo pake delphi gmn ya ....
user image
more 13 years ago

tomblox

gini mas jagur pertama2 pelajarin dulu netsh interface ip untuk referensinya ni alamatnya http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netsh.mspx?mfr=true nah ini kode singkatnya tambahkan pada event button click, dan jangan lupa tambahkan ShellAPI pada uses statement-nya //misalkan kita mengganti alamat ip dengan 192.168.0.5 ShellExecute(Handle,PChar('Open'),PChar('Netsh''),PChar('Interface IP Set Address Local Static 192.168.0.5 255.255.255.0'),nil,SW_SHOW);0 smoga membantu
user image
more 13 years ago

cyber_hecker

prinsipnya sama, cara kerja berbeda :
procedure TForm1.Button1Click(Sender: TObject);
  function ChangeIp(ConnectionName,Ip,Netmask,Gateway:string):boolean;
    function ExecAndWait(FileName:String; Visibility:integer):integer;
    var
      zAppName:array of char;
      zCurDir:array of char;
      WorkDir:String;
      StartupInfo:TStartupInfo;
      ProcessInfo:TProcessInformation;
      Resultado: DWord;
    begin
      StrPCopy(zAppName,FileName);
      GetDir(0,WorkDir);
      StrPCopy(zCurDir,WorkDir);
      FillChar(StartupInfo,Sizeof(StartupInfo),#0);
      StartupInfo.cb := Sizeof(StartupInfo);
      StartupInfo.dwFlags := STARTF_USESHOWWINDOW;
      StartupInfo.wShowWindow := Visibility;
      if not CreateProcess(nil,
        zAppName,                      { pointer to command line string }
        nil,                           { pointer to process security attributes}
        nil,                           { pointer to thread security attributes}
        false,                         { handle inheritance flag }
        CREATE_NEW_CONSOLE or          { creation flags }
        NORMAL_PRIORITY_CLASS,
        nil,                           { pointer to new environment block }
        nil,                           { pointer to current directory name }
        StartupInfo,                   { pointer to STARTUPINFO }
        ProcessInfo) then Result := -1 { pointer to PROCESS_INF }
      else begin
        WaitforSingleObject(ProcessInfo.hProcess,INFINITE);
        GetExitCodeProcess(ProcessInfo.hProcess,Resultado);
        Result := Resultado;
      end;
    end;
  begin
    Result:=( ExecAndWait( 'netsh interface ip set address "'+
                           ConnectionName+'" '+
                          ' static '+Ip+ ' '+NetMask +' '+GateWay+' 1',sw_hide)=0 );
  end;
begin
  if NOT ChangeIp( 'Local Area Connection',
                   '192.168.10.22',
                   '255.255.255.0',
                   '192.168.10.2') then showmessage('Error changing IP')
                                    else showmessage('Ip Changed without errors');
end;
happy coding :D
more ...
  • Pages:
  • 1
Share to

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com