AÇIKLAMA
Bu program C++ Builder 6 projesidir. Bu program ile kullandığınız modemin arayüzü web browser içinde açılmaktadır.
Programın Tamamını Aşağıdaki Linkten İndirebilirsiniz
Program Kodu:
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "Unit1.h" #include "Registry.hpp" String tut="SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces"; String ac=""; //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::FormCreate(TObject *Sender) { TRegistry *Reg=new TRegistry; Reg->RootKey=HKEY_LOCAL_MACHINE; if(Reg->OpenKey(tut,false)) { Reg->GetKeyNames(ListBox1->Items); Reg->CloseKey(); } for(int i=0;i<ListBox1->Items->Count;i++) { String put=tut; put=put+"\\"+ListBox1->Items->Strings[i]; TRegistry *Feg=new TRegistry; Feg->RootKey=HKEY_LOCAL_MACHINE; if(Feg->OpenKey(put,false)) { ListBox2->Items->Clear(); Feg->GetValueNames(ListBox2->Items); int saydir=0; String defaultgateway="DhcpDefaultGateway"; String dhcpipadres="DhcpIPAddress"; String dhcpnameserver="DhcpNameServer"; for(int p=0;p<ListBox2->Items->Count;p++) { if(defaultgateway==ListBox2->Items->Strings[p]) saydir++; if(dhcpipadres==ListBox2->Items->Strings[p]) saydir++; if(dhcpnameserver==ListBox2->Items->Strings[p]) saydir++; if(saydir==3) { TRegistry *Peg=new TRegistry; Peg->RootKey=HKEY_LOCAL_MACHINE; if(Peg->OpenKey(put,false)) { ac=Peg->ReadString("DhcpNameServer"); ac="http://"+ac; ShellExecute(0,"open",ac.c_str(),"" ,"",SW_SHOW); break; } } } //iç for sonu }//if sonu }// for sonu Application->Terminate(); } //---------------------------------------------------------------------------
| Yorumlar |
|
Powered by !JoomlaComment 3.26

