V¡®u§ 849 Posted April 3, 2012 Logo abaixo segue o código de um pequeno programa feito em C++ Builder 2010 que captura o nome do computador://--------------------------------------------------------------------------- #include #pragma hdrstop #include "Unit1.h" #include #include #include #include "dstring.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } AnsiString GetLocalComputerName() { TCHAR chrComputerName[MAX_COMPUTERNAME_LENGTH + 1]; AnsiString strRetVal; DWORD dwBufferSize = MAX_COMPUTERNAME_LENGTH + 1; if(GetComputerName(chrComputerName,&dwBufferSize)) { strRetVal = chrComputerName; } else { strRetVal = ""; } return(strRetVal); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender) { ShowMessage(GetLocalComputerName()); Memo1->Lines->Add(GetLocalComputerName()); } //--------------------------------------------------------------------------- Download Source: http://www.4shared.com/rar/ItH2uTub/Source_-Cyber-Gamers.html http://www.badongo.com/file/26694485 http://rapidshare.com/files/1566564959/Source_-Cyber-Gamers.rar http://turbobit.net/hqgl8qqpz443.html http://ul.to/g459c0au http://www.ziddu.com/download/19053658/Source-Cyber-Gamers.rar.html http://www9.zippyshare.com/v/19635170/file.html Share this post Link to post Share on other sites