Hazır Program

Anasayfa Programlama C++ Builder Modem Arayüzünü Açan Program


Modem Arayüzünü Açan Program

E-posta Yazdır

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:

  1. //---------------------------------------------------------------------------
  2.  
  3. #include <vcl.h>
  4. #pragma hdrstop
  5.  
  6. #include "Unit1.h"
  7. #include "Registry.hpp"
  8.  
  9. String tut="SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces";
  10. String ac="";
  11. //---------------------------------------------------------------------------
  12. #pragma package(smart_init)
  13. #pragma resource "*.dfm"
  14. TForm1 *Form1;
  15.  
  16. //---------------------------------------------------------------------------
  17. __fastcall TForm1::TForm1(TComponent* Owner)
  18.         : TForm(Owner)
  19. {
  20. }
  21. //---------------------------------------------------------------------------
  22.  
  23.  
  24. void __fastcall TForm1::FormCreate(TObject *Sender)
  25. {
  26.  
  27. TRegistry *Reg=new TRegistry;
  28. Reg->RootKey=HKEY_LOCAL_MACHINE;
  29. if(Reg->OpenKey(tut,false))
  30. {
  31. Reg->GetKeyNames(ListBox1->Items);
  32. Reg->CloseKey();
  33. }
  34.  
  35. for(int i=0;i<ListBox1->Items->Count;i++)
  36. {
  37. String put=tut;
  38. put=put+"\\"+ListBox1->Items->Strings[i];
  39. TRegistry *Feg=new TRegistry;
  40. Feg->RootKey=HKEY_LOCAL_MACHINE;
  41.  
  42. if(Feg->OpenKey(put,false))
  43. {
  44. ListBox2->Items->Clear();
  45. Feg->GetValueNames(ListBox2->Items);
  46. int saydir=0;
  47. String defaultgateway="DhcpDefaultGateway";
  48. String dhcpipadres="DhcpIPAddress";
  49. String dhcpnameserver="DhcpNameServer";
  50. for(int p=0;p<ListBox2->Items->Count;p++)
  51. {
  52.  if(defaultgateway==ListBox2->Items->Strings[p])
  53.  saydir++;
  54.  if(dhcpipadres==ListBox2->Items->Strings[p])
  55.  saydir++;
  56.  if(dhcpnameserver==ListBox2->Items->Strings[p])
  57.  saydir++;
  58.  
  59. if(saydir==3)
  60. {
  61.  TRegistry *Peg=new TRegistry;
  62.  Peg->RootKey=HKEY_LOCAL_MACHINE;
  63.  if(Peg->OpenKey(put,false))
  64.   {
  65.   ac=Peg->ReadString("DhcpNameServer");
  66.   ac="http://"+ac;
  67.   ShellExecute(0,"open",ac.c_str(),"" ,"",SW_SHOW);
  68.   break;
  69.   }
  70. }
  71.  
  72. } //iç for sonu
  73.  
  74. }//if sonu
  75. }// for sonu
  76. Application->Terminate();       
  77. }
  78. //---------------------------------------------------------------------------
  79.  
  80.  

Yorumlar
Yeni Ekle Ara
+/-
Yorum yaz
Adınız:
E-posta:
 
Web Sayfas1:
Başlık:
UBB Kodu:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Lütfen resimdeki güvenlik kodunu giriniz.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Son Güncelleme ( Çarşamba, 13 Mayıs 2009 17:57 )  

Üye Giriş Formu



Kimler Çevrimiçi

Yok